Android: How to deal with "Could not determine java version from '10 .0.1'"

Introduction

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

① Upgrade gradle

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.

スクリーンショット 2018-07-25 16.48.32.png

It became as above and could not be solved.

② Change the version of gradle / wrapper / gradle-wrapper.properties

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
スクリーンショット 2018-07-25 16.53.49.png

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

Android: How to deal with "Could not determine java version from '10 .0.1'"
Project facet Java version 13 is not supported. How to deal with
[Android] How to deal with dark themes
How to deal with errors in Rails s could not find a JavaScript runtime.
How to deal with 405 Method Not Allowed error in Tomcat + JSP
How to switch Java version with direnv in terminal on Mac
How to call with One Touch (without confirmation) on Android (Java)
How to compile Java with VsCode & Ant
[Java] How to compare with equals method
Java: How to send values from Servlet to Servlet
How to install the legacy version [Java]
How to deal with Precompiling assets failed.
Java8 / 9 Beginners: Stream API addiction points and how to deal with them
You cannot change the project facet version from a dynamic web module to x.x. How to deal with
[Java] How to test for null with JUnit
How to use Java framework with AWS Lambda! ??
How to get Class from Element in Java
How to use Java API with lambda expression
How to make Unity Native Plugin (Android version)
[Java] How to switch from open jdk to oracle jdk
How to use nfs protocol version 2 with ubuntu 18.04
How to write React Native bridge ~ Android version ~
How to call functions in bulk with Java reflection
[Android Studio] How to change TextView to any font [Java]
Diet program with preprocessor (how to deal with i-appli size)
How to jump from Eclipse Java to a SQL file
How to deal with fatal: remote origin already exists.
[Java] How to omit spring constructor injection with Lombok
How to deploy Java to AWS Lambda with Serverless Framework
[Java] How to extract the file name from the path
How to deal with No template for interactive request
[Java] How to encrypt with AES encryption with standard library
[Ruby] How to use rbenv (version `x.x.x'is not installed)
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
[Android Studio] [Java] How to fix the screen vertically
How to output standard from an array with forEach
How to use Truth (assertion library for Java / Android)
[Rails] How to deal with URL changes after render
How to change from Oracle Java 8 to Adopt Open JDK 9
From Java to Ruby !!
[Java] How to erase a specific character from a character string
How to determine the look-ahead request (Prefetch) from the browser
How to build Java development environment with VS Code
How to prevent editTextPreference of android PreferenceFragmentCompat from breaking
Common problems with WSL and how to deal with them
[Docker + Rails] How to deal with Rails server startup failure
[Java] How to start a new line with StringBuilder
How to get jdk etc from oracle with cli
How to read a library from a JAR file with VS Code << How to not use Maven / Gradle >>
How to take a screenshot with the Android Studio emulator
Java to fly data from Android to ROS of Jetson Nano
Let's write how to make API with SpringBoot + Docker from 0
An unsupported Java version How to get rid of errors
How to decompile apk file to java source code with MAC
How to use trained model of tensorflow2.0 with Kotlin / Java
How to handle exceptions coolly with Java 8 Stream or Optional
Use Java included with Android Studio to build React Native
How to get values in real time with TextWatcher (Android)
[Java] How to convert a character string from String type to byte type
How to store a string from ArrayList to String in Java (Personal)
Check communication from Android to node.js server with protocol buffers