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

[Fix] Android Build Failed (Task :react-native-firebase_auth:compileDebugJavaWithJavac FAILED) #8023

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sanjeevzsuper
Copy link

@sanjeevzsuper sanjeevzsuper commented Sep 18, 2024

Description

In Android build getting below error before this fix: -

Task :react-native-firebase_auth:compileDebugJavaWithJavac FAILED
/xxx/xxx/xxx/node_modules/@react-native-firebase/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java:1620: error: pattern matching in instanceof is not supported in -source 11

Tried all the solution but not working So I have done these PR changes then I am able to run build android build

Related issues

#7816

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 8:14am

@CLAassistant
Copy link

CLAassistant commented Sep 18, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is impossible to tell what this PR is doing since the file was reformatted
Can you push a PR that only has the functional change you desire, plus a description of what the PR is doing?

Please note that attempts to make react-native-firebase compatible with JDK < 17 are likely not functional + cannot be supported, as the various toolchains have minimum requirements of JDK17 now

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - for the reasons stated in the related issue, this will fix this specific compile issue with JDK17 being required, however that will not result in a supported configuration. JDK17 is the minimum supported version and needs to be used throughout your android app build toolchains. From that perspective, removing this JDK17-specific feature is actually a developer regression, as this JDK17 feature usage results in a very fast + very obvious failure for developers indicating to them immediately that something is wrong (where "something" is: you must use JDK17)

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

Successfully merging this pull request may close these issues.

3 participants