react-native-screen-brightness icon indicating copy to clipboard operation
react-native-screen-brightness copied to clipboard

Please make the androidx.core version able to set from a variable.

Open sarapple opened this issue 3 years ago • 2 comments

Hello!

Would it be possible to make the androidx.core a variable that can be set similar to how it works in react-native-netinfo repo? If you follow the thread, the issue is very similar.

https://github.com/react-native-netinfo/react-native-netinfo/issues/491#issuecomment-911588962

FAILURE: Build failed with an exception.

* What went wrong:
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.core:core:1.7.0-alpha02.

We specifically run into this problem while trying to build for SDKVersion 30, which seems incompatiable with the latest androidx.core.

sarapple avatar Sep 02 '21 23:09 sarapple

Our project is hitting the same issue. (We're on sdk version 28.) As a temporary fix, we've done two things:

  1. Updated line 38 of node_modules/react-native-screen-brightness/android/build.gradle from androidx.core:core:1.+ to androidx.core:$androidXCore:

Screen Shot 2021-09-03 at 2 03 53 PM

  1. Added androidXCore = "1.6.0" to our app's android/build.gradle file under buildscript.ext:

Screen Shot 2021-09-03 at 2 01 07 PM

It looks like this combination stops react-native-screen-brightness from using the newly-released androidx.core version 1.7.0-alpha02 and forces it back to 1.6.0 instead, which fixes the build for our app.

jayharr-is avatar Sep 03 '21 18:09 jayharr-is

Hello, wondering if there is any possibility of implementing the change @jayharr-is suggested? Thank you :)

sarapple avatar Sep 14 '21 18:09 sarapple