当前位置:   article > 正文

iMac上Android Studio requires Java 7 or later to run.You are currently using Java 6_gradle 4.8 requires java 7 or later to run. you ar

gradle 4.8 requires java 7 or later to run. you are currently using java 6.

异常处理

升级gralde以后编译报错

  • 问题现象 升级gradle到高版本,例如我升级到3.3以后编译报错。然而查看File-> Project Structure -> SDK Location里面的JDK已经是1.7 Error:Gradle 3.3 requires Java 7 or later to run. You are currently using Java 6.
  • 问题原因 Android Studio会自己设置默认的jdk位置,默认的jdk是1.6*,1.7+,虽然修改了Project Structure,但是plist里面并没有修改。
  • 解决办法:

进入Android Studio的私有目录,需要修改/Application/Android Studio/Contents/info.plist中下面的配置:

<key>JVMVersion</key> <string>1.6*,1.7+</string>

例如我改为了,之后重试发现已经OK

<key>JVMVersion</key> <string>1.7*,1.7+</string>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/631044
推荐阅读
相关标签
  

闽ICP备14008679号