I tried to import a gradle project in IntelliJ and I'm getting the following error :
Error:Could not determine java version from '9.0.4'.
As said is the gradle project in java 1.8 ( exactly 1.8.0_152) and the version on my Linux is 9.0.4.
I think I should downgrade the version from 9.0.4 to this 1.8.0_152 but I don't know how to do it.
Can I fix the problem without downgrading the Java version ?
This is a well known bug! Here you can find the issue documentation with a possible solution on github: #16536
Edit the file /android/gradle/wrapper/gradle-wrapper.properties and update the last line with:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip
Alternate I found this intellij specific solution, solved by pointing intellij at a location of a custom gradle install:
"File > Settings... > Build, Execution, Deployment > Gradle > Use local gradle distribution"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With