Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sarapple opened this issue Sep 2, 2021 · 2 comments · May be fixed by #43
Open

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

sarapple opened this issue Sep 2, 2021 · 2 comments · May be fixed by #43

Comments

@sarapple
Copy link

sarapple commented Sep 2, 2021

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.

react-native-netinfo/react-native-netinfo#491 (comment)

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.

@jayharr-is
Copy link

jayharr-is commented Sep 3, 2021

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.

@sarapple
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants
@jayharr-is @sarapple and others