Could not find tools.jar when build gradle project


参考网址:https://stackoverflow.com/questions/45456210/could-not-find-tools-jar-when-build-gradle-project

执行:

gradlew.bat clean build -x test

出错信息:

Parallel execution with configuration on demand is an incubating feature.
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that D:\Java\jre contains a valid JDK installation.

解决:

在根目录下新建一个gradle.properties,在其中加上一行即可:

org.gradle.java.home=C:/path/to/your/jdk

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM