-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 build failed #7816
Comments
i am also getting this error |
Same here, using expo 49 SDK and react-native |
I solved it thanks to your help :) |
How did you fix it? |
your "ReactNativeFirebaseAuthModule.java" file change from " Sorry, My English has a lot of flaws. Did you understand? |
I think you forgot a variable and a comma on your corrected line: |
I did the same as you and installed this patch package |
thanks to you, my corrected line is fixed |
We are also having this issue, patching for the moment till a more permanent fix 😊 |
Interesting, that line of code was a recent fix yes, I didn't realize it broke support for JDK11 - and I'll admit I thought everyone had moved to JDK17+ now (we test with JDK21 and 17, for what it's worth - and why this was invisible to me/us -
If someone wanted to propose a PR, I could happily merge it |
Gosh same issue is still now resolved by this thank you |
I'm also have this problem after I have installed the firebase auth. gradle: 8.0.1 |
This saved my day thanks! |
Dude don't worry about the English. You're a lifesaver! |
"@react-native-firebase/app": "^19.2.2", I tried above solution but its not working . it cause errors in other packages IDK why.What i have to do next -> any idea |
My Solution is node_modules@react-native-firebase\auth\android\src\main\java\io\invertase\firebase\auth\ReactNativeFirebaseAuthModule.java Remove : |
i use jdk 17 and it still causes this issue. anyone have the same problem? |
This is a documentation issue at this point. We ought to specify what minimum JDK + iOS versions are required for RNFB here: https://rnfirebase.io/platforms |
I suspect you think you are running JDK17 but you are actually building with some lower JDK. This may seem improbable but it's the only plausible explanation for a build failure when using a language feature that is not available in JDK < 17 and is available in JDK >= 17 @russellwheatley --> suggest adding this along with docs as a hard fail / fast fail in build files: |
I had the same issue despite having the right JDK and everything. It was driving me mad. But then I simply upgraded React Native from 0.74.5 to 0.75.3 by following the upgrade helper, and it somehow suddenly began working. 🤷🏻♂️ |
Thanks a lot for this. |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
For anyone still seeing this error and you are 100% sure you are running JDK 17 your problem is probably that you are running a react native version that uses AGP android gradle tools 7.* and below. React native firebase defaults to using jdk11 for any version of AGP below 8. Check So stop pulling your hair and just use the patch package solution above or upgrade to a version of react native that uses android gradle tools 8 >. patch here #7816 (comment) |
@nrtrjmly Interesting! that's a subtle interaction - missed that in previous analysis of this problem. AGP8+ has been in use long enough that I hadn't tested back far enough to attempt AGP<=8 Indeed it is kind-of-a-bug to have 11 listed for source compatibility since the code is no longer compatible with it. That should have been bumped to 17 at the same time the JDK17+ source feature was added |
"@react-native-firebase/auth": "^20.0.0",
"react-native": "0.72.6",
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
after: ./gradlew build --warning-mode all
I saw that the sourceCompatibility is JavaVersion.VERSION_11 but line 1620 from /xx/xx/xx/@react-native-firebase/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java
is in java 17 like this: if (exception instanceof FirebaseAuthUserCollisionException collEx)
and it should be
if (exception instanceof FirebaseAuthUserCollisionException) {
FirebaseAuthUserCollisionException collEx = (FirebaseAuthUserCollisionException) exception;
}
The text was updated successfully, but these errors were encountered: