-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Gradle distribution needs to be updated in order to work with JDK v9 #16536
Comments
Get the same problem |
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. |
Opening project in android studio fixes this by prompting to update gradle version. |
What it works for me was to rollback to Java8
|
I don't think any of these workarounds are good.
In theory, updating to the latest gradle wrapper, and then upgrading gradle to only 3.3 and using the android plugin 2.3.0+ which might be compatible with RN might be a solution. |
Same with version '10'. "Could not determine java version from '10'. |
get the same problemFAILURE: Build failed with an exception.
I follow lndgalante roll back to java8. That is!! it work for me brew cask uninstall java |
For me, I change my java version to java 8. It's work. |
I had the error I followed @alexanderkjeldaas 's advice and upgraded Gradle. This also made me update the minimum sdk version, but now I still see the warning |
@Beamanator which gradle version are you using or how did you update your gradle? Am having the exact same error as yours. Downgrading to Android Studio 2.3 is not part of my "todo" list! |
@ajharry69 I'm using the following versions: |
Gradle refresh failed |
Closing this issue, because RN 0.56 uses gradle 4.x. |
Well I am having this issue right now with RN 0.56
although as you say that it should be gradle 4.x when I am trying to run ./gradlew assemblerelease it showed that it downloaded gradle 3.5 |
Same thing but for Java version 11.
Problem solved by changing the line in |
I follow danielsellergren's latest comment installing: Got new error when running 'npm run android'
|
Is 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
react-native run-android
Expected Behavior
Should build android files correctly
Actual Behavior
Errors with following details
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.
The text was updated successfully, but these errors were encountered: