-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
React Native is not compatible with JDK 18 #34103
Comments
as an aside also spotted CPU/memory leak w Gradle 7.6 nightly bout month ago in CI w JDK 18
edit: nvm think was forgetting to clean between Debug/Release at the time, closing for now |
initially took the ain't going near that sh!t mentality, but thx for the writeup i've been inspired again, will investigate and report back as per usual x) |
|
seems fine w AGP 7.2.1 (AGP 7.2.0 still causing the runtime error) unsure which commit yet, can still check non-aarch64 if needed |
still requires gradle 7.5+ though right? Which just released like, yesterday? |
good point i don't think quite requires gradle 7.5+ |
but yh now looks time to bump to 7.5 stable for official/full JDK 18 support (by full, not jus AGP bump to 7.2.1)
https://docs.gradle.org/7.5/release-notes.html#jvm-toolchains-improvements i'm going to check/run locally soon, debug/release builds looking good |
Just for sanity check: I'd like to bump Gradle to 7.5 to make sure the next version is JDK 18 compatible. Feel free to send a PR over and ping me there for a review :) |
Summary: ### Follow-up - #34103 - #33823 #### Debug/Release further tested on RN 0.70.0-rc.0-1 - leotm/react-native-template-new-architecture#775 - builds/runtime: locally on `macos-13` b2 - builds: in CI `ubuntu-20.04` latest (not yet beta `ubuntu-22.04`) cc cortinico dulmandakh ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Changed] - Bump Gradle to 7.5.0 Pull Request resolved: #34310 Test Plan: Everything builds and runs as expected. Reviewed By: cipolleschi Differential Revision: D38311861 Pulled By: cortinico fbshipit-source-id: c4e9e7a9052a067ffabae87204d20190ef46b351
Summary: ### Follow-up - #34103 - #33823 #### Debug/Release further tested on RN 0.70.0-rc.0-1 - leotm/react-native-template-new-architecture#775 - builds/runtime: locally on `macos-13` b2 - builds: in CI `ubuntu-20.04` latest (not yet beta `ubuntu-22.04`) cc cortinico dulmandakh ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Changed] - Bump Gradle to 7.5.0 Pull Request resolved: #34310 Test Plan: Everything builds and runs as expected. Reviewed By: cipolleschi Differential Revision: D38311861 Pulled By: cortinico fbshipit-source-id: c4e9e7a9052a067ffabae87204d20190ef46b351
Summary: ### Follow-up - facebook#34103 - facebook#33823 #### Debug/Release further tested on RN 0.70.0-rc.0-1 - leotm/react-native-template-new-architecture#775 - builds/runtime: locally on `macos-13` b2 - builds: in CI `ubuntu-20.04` latest (not yet beta `ubuntu-22.04`) cc cortinico dulmandakh ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Changed] - Bump Gradle to 7.5.0 Pull Request resolved: facebook#34310 Test Plan: Everything builds and runs as expected. Reviewed By: cipolleschi Differential Revision: D38311861 Pulled By: cortinico fbshipit-source-id: c4e9e7a9052a067ffabae87204d20190ef46b351
Summary: ### Follow-up - facebook#34103 - facebook#33823 #### Debug/Release further tested on RN 0.70.0-rc.0-1 - leotm/react-native-template-new-architecture#775 - builds/runtime: locally on `macos-13` b2 - builds: in CI `ubuntu-20.04` latest (not yet beta `ubuntu-22.04`) cc cortinico dulmandakh ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Changed] - Bump Gradle to 7.5.0 Pull Request resolved: facebook#34310 Test Plan: Everything builds and runs as expected. Reviewed By: cipolleschi Differential Revision: D38311861 Pulled By: cortinico fbshipit-source-id: c4e9e7a9052a067ffabae87204d20190ef46b351
Sorry for reviving this thread but is there no way to setup and utilize gradle toolchains? My knowledge of Android and gradle is very limited but based on what little I understand, this should make it so gradle is using a specific version of Java specified in the config and therefore not have an expectation from the user to download and set up the "right" version of Java locally, right? The latest version of RN utilizes gradle android plugin 7.3.1 and support for toolchains was included in 7.3 based on the comment here. I've added the following bit to my android/app/build.gradle and run the app and it worked fine but I'm not sure if it actually did anything or it was a placebo. java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.ADOPTIUM
}
} |
I am Using java 19+ with Gradle 7.6 Facing Same Issue |
Which version of Java and Gradle i use for React-Native? |
The recommended version is Java 17 |
yes i solve the issue, now install java 11, now its ok thank you for your
response
…On Fri, Jul 28, 2023 at 8:11 AM Nicola Corti ***@***.***> wrote:
The recommended version is Java 17
—
Reply to this email directly, view it on GitHub
<#34103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARMNL3ZT6DMYHI35WR6BZNTXSPJBXANCNFSM52G2ZB5A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
I'm opening this issue for the sake of visibility/transparency.
We received multiple reports of users on JDK 18 not being able to build app for Android using the New Architecture
I did a small investigation on the JDK 18 support.
There are a couple of things to note here:
That's the JDK I was using:
Version
0.68.0
Stacktrace
The text was updated successfully, but these errors were encountered: