question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[android] Version 0.2.4 requires targetSdkVersion = 31

See original GitHub issue

Describe the bug The latest version of the library (0.2.4) appears to break the build process for RN Android projects due to requiring a higher minCompileSdk than is specified in standard React Native projects.

To Reproduce Steps to reproduce the behavior:

  1. Create a new React Native project via npx react-native init
  2. Install the library via yarn add @stripe/stripe-react-native
  3. Run the android build via yarn run android
  4. See error

Execution failed for task ‘:app:checkDebugAarMetadata’. A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction The minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module’s compileSdkVersion (android-30). Dependency: androidx.activity:activity-compose:1.4.0. AAR metadata file: /Users/tom/.gradle/caches/transforms-3/6105d9693b6d1b89f331872365193f55/transformed/jetified-activity-compose-1.4.0/META-INF/com/android/build/gradle/aar-metadata.properties.

Expected behavior The app builds successfully when using the library with fresh RN projects.

Screenshots N/A

Desktop (please complete the following information):

  • macOS Monterey 12.1

Smartphone (please complete the following information):

  • Android Emulator, any

Additional context N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:29 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
lbinscheckcommented, Feb 17, 2022

We have the same problem in our project after updating to 0.2.4

Waiting for RN 68 will take forever for Expo users. Is there another option to just waiting?

2reactions
charliecruzan-stripecommented, Sep 12, 2022

v0.2.3 can be used in projects that have compileSdkVersion set to 30

v0.17.0 can be used in projects that have compileSdkVersion set to 31

would it have current patches and features?

Unfortunately no, since without bumping compileSdkVersion, you cannot use the latest version of stripe-android

Read more comments on GitHub >

github_iconTop Results From Across the Web

Meet Google Play's target API level requirement
New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level...
Read more >
Cant install app from PlayStore for Android 12 targetSDK 31
Recently I have updated CompileSDKVERSION: 31, User can download the app but after download, app is not getting install in android lastet ...
Read more >
Target API level requirements for Google Play apps
Each app specifies a targetSdkVersion (also known as the target API level) in the manifest file. The target API level indicates how your...
Read more >
Setting Android SDK versions - Clover Developer Docs
The target SDK version ( targetSdkVersion ) informs Android which compatibility layers it must enable to ensure your app runs correctly. The target...
Read more >
is greater than this module's compilesdkversion (android-30 ...
Android app won't build -- The minCompileSdk (31) specified in a ... stripe/stripe-react-native[android] Version 0.2.4 requires targetSdkVersion = 31#812.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found