Could not determine java version from '9.0.4'.
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: Linux 4.13 Node: 9.4.0 Yarn: Not Found npm: 4.6.1 Watchman: Not Found Xcode: N/A Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0
Steps to Reproduce
- Plugged an Android phone, enabled developer mode and debugging and confirmed that adb is recognised the device by running
adb devices
- Followed the official docs and created a react-native app called
AwesomeProject
usingreact-native init AwesomeProject
command. - Changed the directory to inside the project and ran
react-native run-android
Expected Behavior
Start the AwesomeProject in connected Android Device.
Actual Behavior
Didn’t start the app on my mobile. Error on console appeared.
Scanning folders for symlinks in /home/pankaja/Documents/Projects/react-native/AwesomeProject/node_modules (7ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.4'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
^C
pankaja@pankaja-HP-Pavilion-15-Notebook-PC:~/Documents/Projects/react-native/AwesomeProject$ react-native info
Reproducible Demo
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:25 (2 by maintainers)
Top Results From Across the Web
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 - could not determine java version 11.0.8 or any ...
A quick guide to fix could-not-determine-java-version when working with Gradle tool for any Gradle version.
Read more >Could not determine java version from '9.0.1' - Gradle Forums
I fixed it by changing distributionUrl in the file [project]\gradle\wrapper\gradle-wrapper.properties to point to disribution of version 4.3. ( ...
Read more >Solved : Could not determine java version when running gradle
BuildExceptionReporter ] Could not determine java version from '9.0.4'. 21:04:36.822 [ERROR] [org.gradle.internal.buildevents.
Read more >Android : Could not determine java version from '9.0.1' - YouTube
Android : Could not determine java version from '9.0.1' [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android : Could not determine ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop 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
Top GitHub Comments
just in case you need a quick fix, you can uninstall JDK 9 and install JDK 8 instead
Hey, I had the same issue. I went to the gradle. properties file and changed the version in the ‘distributionUrl’ field to the latest version.
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip