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

Android gradle build fails #38

Open
robinshin opened this issue Jun 30, 2023 · 5 comments
Open

Android gradle build fails #38

robinshin opened this issue Jun 30, 2023 · 5 comments

Comments

@robinshin
Copy link

robinshin commented Jun 30, 2023

When running > ./gradlew bundleRelease, I have this error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-user-identity:bundleLibRuntimeToJarRelease'.
> Could not create task ':react-native-user-identity:compileReleaseJavaWithJavac'.
   > In order to compile Java 9+ source, please set compileSdkVersion to 30 or above

It happens since react-native 0.72.0 and is due to:

.android/build.gradle:

android {
    compileSdkVersion 28
    ...
}

Possible fix: replace this by

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
...
compileSdkVersion safeExtGet('compileSdkVersion', 28)
@robinshin
Copy link
Author

@juliandramirez

@robinshin
Copy link
Author

Any news please? I always have to manually do the update in order to build on Android

@juliandramirez

@dualism98
Copy link

Same problem

@Puetz
Copy link

Puetz commented Aug 31, 2023

Same here, please fix this. I really like the package and would love to continue using it.

@dualism98
Copy link

@Puetz, hey. I made this patch to resolve this problem. But, of course, I hope @juliandramirez will make his own fix
react-native-user-identity+1.5.2.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants