stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.27k stars 264 forks source link

The minCompileSdk (30) specified in a dependency's AAR metadata is greater than this module's compileSdkVersion (android-29) #606

Closed ilyagru closed 2 years ago

ilyagru commented 3 years ago

Describe the bug

I'm trying to update the package for a project because of https://github.com/stripe/stripe-react-native/issues/578, so I'm bumping from "@stripe/stripe-react-native": "^0.1.4" to "@stripe/stripe-react-native": "^0.2.2".

My project passes the requirements however:

Stripe requirements Android Android 5.0 (API level 21) and above Android gradle plugin 4.x and above

Or the README file is not updated with higher requirements for Android for v0.2.2?

When I try to build the app, on the newest version I'm getting this error

> Task :app:checkDevelopmentDebugAarMetadata FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
58 actionable tasks: 54 executed, 4 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDevelopmentDebugAarMetadata'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-tooling:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/c190b22d01faa613cb2cea22e95d9199/jetified-ui-tooling-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.activity:activity-compose:1.3.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/2d64ca1ebcf8b190edf0634f82aa2095/jetified-activity-compose-1.3.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.activity:activity-ktx:1.3.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/2d0f75103af319a65cb07879f1059baa/jetified-activity-ktx-1.3.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.material:material:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/cb1ea19e3a0ff0cad7ce44e3d48502a2/jetified-material-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.material:material-ripple:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/8b43324800327205cd34f26894b46eba/jetified-material-ripple-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.foundation:foundation:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/6d42365d783ba874a566a1d5db1820c8/jetified-foundation-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.material:material-icons-extended:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/ad1be8e7f59bc2bdf5fdd3d8340ba35b/jetified-material-icons-extended-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.material:material-icons-core:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/0d4029b2acb5ffad4baf481f02927041/jetified-material-icons-core-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.runtime:runtime-livedata:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/a736907bb98c68d5f7af2f0eeb88ec55/jetified-runtime-livedata-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-tooling-data:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/e8d11ed0d6f12bc2fb5af01a901ccc1b/jetified-ui-tooling-data-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.animation:animation:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/d636cdf64662e0e628e225910c172e15/jetified-animation-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.foundation:foundation-layout:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/47ecc646f4c01cbc27a16f272cc78643/jetified-foundation-layout-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.animation:animation-core:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/0e33fc87a12c29fbcc91f08fec02ff09/jetified-animation-core-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/03c57652fd7da7e423252fe2f64d95fe/jetified-ui-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-text:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/020893374a3a033a512145d3d79013e3/jetified-ui-text-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.activity:activity:1.3.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/ebdac0733d12aa9a8d939e127dd04f96/jetified-activity-1.3.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.runtime:runtime-saveable:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/0db8d2c06ee995b447e0e5f8d2bd94d1/jetified-runtime-saveable-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-graphics:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/4aed12a2094e6eff4eb696aaa242172b/jetified-ui-graphics-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-unit:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/071a7a40ed957ef9205c930050f5e966/jetified-ui-unit-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-geometry:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/2ae34c473b2ee41a0f41691fbfe8d0f8/jetified-ui-geometry-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-tooling-preview:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/b3ebe8be2b313c634351ddbaf84f8fa4/jetified-ui-tooling-preview-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.runtime:runtime:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/fe8cda599faac593ce85f21f228c5652/jetified-runtime-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.profileinstaller:profileinstaller:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/e18830752ede759f0115684626983cc1/jetified-profileinstaller-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
      > The minCompileSdk (30) specified in a
        dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
        is greater than this module's compileSdkVersion (android-29).
        Dependency: androidx.compose.ui:ui-util:1.0.0-rc02.
        AAR metadata file: /Users/ilyagruzhevski/.gradle/caches/transforms-2/files-2.1/2c25a1145b5f5ff9c5a18026dc0882e1/jetified-ui-util-1.0.0-rc02/META-INF/com/android/build/gradle/aar-metadata.properties.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 19s

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior The app should build and launch with v0.2.2.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

mchamorro7 commented 3 years ago

Same problem here, above version 1.4.0 I have building issues.

ahmedelsayed11 commented 3 years ago

i have the same issue any solution ?

carlosa54 commented 2 years ago

A bit late here but in case this helps someone else, I had the same issue and solved it by bumping the compileSdkVersion and targetSdkVersion.

From:

compileSdkVersion = 29
targetSdkVersion = 29

To:

compileSdkVersion = 30
targetSdkVersion = 30
charliecruzan-stripe commented 2 years ago

The minSdkVersion remains the same at 21- as @carlosa54 stated, the thing to update here is your compileSdkVersion and targetSdkVersion. This allows you to target newer Android OS versions. Android 11 (sdkVersion 30) was released in Sept of 2020, so it's a good idea to support it.