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

前端 未结 6 2466
感动是毒
感动是毒 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:41

    I managed to solve this problem by renaming Info.plist and version.plist to Info.plist.old and version.plist.old in /Applications/IntelliJ IDEA.app/Contents/jre/jdk/Contents folder on Mac.

    Executed

    mv Info.plist Info.plist.old | mv version.plist version.plist.old

    in folder mentioned above. Then I just run Intellij and things were working fine. Probably, it would be possible to fix this by renaming only one of these files but I haven't tested it. After fixing it I haven't rename files back to Info.plist and version.plist. Should I?

    After this fix, I also created idea.properties file in ~/Library/Preferences/IntelliJIdea2016.2 and added line gradle.java.home=$(/usr/libexec/java_home)

提交回复
热议问题