Gradle distribution needs to be updated in order to work with JDK v9
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: macOS Sierra 10.12.6 Node: 8.7.0 Yarn: 1.2.1 npm: 5.5.1 Watchman: 4.9.0 Xcode: Xcode 9.0.1 Build version 9A1004 Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed) react: 16.0.0-beta.5 => 16.0.0-beta.5 react-native: 0.49.3 => 0.49.3
Steps to Reproduce
- Update to JDK version 9+
- run
react-native run-android
Expected Behavior
Should build android files correctly
Actual Behavior
Errors with following details
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.1'.
Solution seems to be described here: https://discuss.gradle.org/t/could-not-determine-java-version-from-9-0-1/24457 I tried it and got past the error, but had issues when opening project in my android studio, so am not sure if further steps are required.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:34
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Upgrading your build from Gradle 7.x to the latest
This chapter provides the information you need to migrate your Gradle 7.x builds ... Run gradle wrapper --gradle-version 7.6 to update the project...
Read more >Gradle: Could not determine java version from '11.0.2'
The obvious way, would be to update your project's gradle-wrapper to version 5.0. However, before updating, try running gradle app:installDebug ...
Read more >Gradle Enterprise version compatibility
Major or minor version updates to the Gradle Enterprise Gradle plugin indicate a compatibility change with Gradle Enterprise (e.g. 3.0 → 3.1 or...
Read more >Known issues with Android Studio and Android Gradle Plugin
Starting with version 4.2, Android Studio now runs on JDK 11. This update causes an underlying behavior change related to signing keys.
Read more >Known Issues for JDK 8 - Oracle
In some circumstances, the Java Control Panel reports the JRE platform version as 1.7 instead of 1.8 when upgrading an older JRE in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This work for me:
Edit the file /android/gradle/wrapper/gradle-wrapper.properties and update the last line with:
So i update the gradle version used for project dependencies.
What it works for me was to rollback to Java8