react-native-screen-brightness
react-native-screen-brightness copied to clipboard
Please make the androidx.core version able to set from a variable.
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.
Our project is hitting the same issue. (We're on sdk version 28.) As a temporary fix, we've done two things:
- Updated line 38 of
node_modules/react-native-screen-brightness/android/build.gradle
fromandroidx.core:core:1.+
toandroidx.core:$androidXCore
:
- Added
androidXCore = "1.6.0"
to our app'sandroid/build.gradle
file underbuildscript.ext
:
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.
Hello, wondering if there is any possibility of implementing the change @jayharr-is suggested? Thank you :)