-
Notifications
You must be signed in to change notification settings - Fork 24k
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
Could not determine java version from '9.0.4'. #17688
Comments
I have same problem
|
Try #16536 to edit the gradle-wrapper.properties |
@TClark000 Thanks, I followed it and it worked. Then another error occurred and fixed it by searching through Stackoverflow answers. Now this error occurs.
Couldn't find a way to fix this. |
just in case you need a quick fix, you can uninstall JDK 9 and install JDK 8 instead |
@pankaja92 |
As @kate-kholyavkina suggested I removed and installed JDK 8. But now I'm getting another error.
And now when I run
|
Fixed the main error by installing JDK 8 instead |
As @kate-kholyavkina suggested uninstall JDK 9 and install JDK 8 instead solved my issue. |
Hi Following this guides helped me build the app in jdk9 https://github.com/gradle-guides/building-java-9-modules HTH |
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 |
I had same issue, on Mac. https://stackoverflow.com/questions/26252591/mac-os-x-and-multiple-java-versions Using |
@kate-kholyavkina's solution worked fine! |
HI
and installed JDK8 but still getting the same error. How come? Done, add also: sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/ |
Running with Java 8 works for me too -- additionally don't forget to set JAVA_HOME in your |
I ask 4 other React Native dev. They all said they have downgraded their Java version to 8. |
downgrade to java8 and set JAVA_HOME in .bash_* works |
just for some up the quick way (removing jdk9), run these commands: sudo apt-get purge openjdk-9-jre-headless |
If any one came across this problem. you don't have to downgrade java version |
not sure what u mean by 'import the android folder into Android studio' |
@kevinzhangftw Open Android Studio and click on ( Import project ) and select android folder in your react-native app By using this way I built my react-native project using Java 10 too |
Thank you Blacktoviche! Great advice and it worked! |
@Blacktoviche But then, we need to upgrade all projects first to actually begin editing the codes... |
Not to begin editing code; just to be able to run it on an emulator. It's an inconvenience, but not a huge one. And I doubt this is seen as the solution moving forward; likely a solution right now, and will be resolved in updates. |
This is resolved by switching to lower Java SDK. As soon as I switch to 1.8 from 1.9 in Intellij and point my redirect my "PATH=%JAVA_HOME%\bin" in terminal, everything starts working! |
switching from java 9 to 8 resolved my issue |
Is 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
adb devices
AwesomeProject
usingreact-native init AwesomeProject
command.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.
Screenshot
Reproducible Demo
The text was updated successfully, but these errors were encountered: