Failed to complete Gradle execution (new project) - java home different

前端 未结 6 2557
感动是毒
感动是毒 2020-12-06 13:07

I downloaded Android Studio version [build 135.1653844] and created a new project. I am getting an error:

Failed to complete Gradle execution.
Cause:
The new         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 13:57

    Though I did not find the root cause where the different javaHomes have been taken from, at least I found a workaround that worked for me:

    Try setting the following in your gradle.properties (either in %USERPROFILE%\.gradle\ or in your project build dir):

    org.gradle.java.home=C:\Program Files\Java\jdk1.6.0_45\jre
    

提交回复
热议问题