Kotlin could not find the required JDK tools in the Java installation

前端 未结 5 1690
面向向阳花
面向向阳花 2020-12-20 11:11

When running ./gradlew clean build I get following message:

> Task :compileKotlin FAILED

FAILURE: Build failed with an exception.

* What we         


        
5条回答
  •  庸人自扰
    2020-12-20 11:36

    I got the exact same problem. I solved it by installing OpenJDK 8 JDK. My machine is running centos so here is my installing command

    sudo yum install java-1.8.0-openjdk-devel.

    I learned from this article that there are two different Java packages, Java Runtime Environment (JRE) and Java Development Kit (JDK). JRE is for running Java programs, and JDK is for developing Java applications. I only had had JRE installed, but not JDK. After installing JDK, my build ran successfully

提交回复
热议问题