When doing ./gradlew
in Android development
Could not determine java version from '10.0.1'.
I encountered the error. I would like to keep a memorandum for beginners.
First, it will be GitHub that I referred to this time. More accurate information is provided, so please refer to it if you like.
GitHub: https://github.com/gradle/gradle/issues/5764 that I referred to this time
https://gradle.org/install/#with-the-gradle-wrapper Refer to the above official article,
upgrade
$ ./gradlew wrapper --gradle-version=4.9 --distribution-type=bin
It seemed that it could be solved by, but in my case, it was the same as the initial error.
It became as above and could not be solved.
gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
Changed as follows
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Change as above and again
Terminal
$ ./gradlew wrapper --gradle-version=4.9 --distribution-type=bin
I think that most people will be solved by doing so.
The following is a case that was not solved even above. I changed the version of gradle / wrapper / gradle-wrapper.properties, In my case I got the following error:
Terminal
because of exception org.spockframework.util.IncompatibleGroovyVersionException: The Spock compiler plugin cannot execute because Spock 1.0.0-groovy-2.3 is not compatible with Groovy 2.4.12.
I got the error and could not upgrade.
http://ksoichiro.blogspot.com/2015/10/gradle-28spock.html I was able to upgrade safely by adjusting build.gradle referring to the above article.
We hope for your reference.
Recommended Posts