Android Studio导入新项目,gradle报 read timed out的情景之一

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bobby_fu/article/details/84985673

我使用Android Studio3.0导入新项目时,gradle报 read timed out的情景之一:
由于项目的sdk没有使用自己下载的jdk1.8,而是使用AndroidStudio默认的jre目录,所以导致这个问题
。只要修改下jdk路径就好:
在这里插入图片描述
但是改完后,这个问题是解决了。又出现一个新问题:

Unable to start the daemon process. 
This problem might be caused by incorrect configuration of the daemon. 
For example, an unrecognized JVM option is used. 
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.8/userguide/gradle_daemon.html 
Please read below process output to find out more: 
MaxPermSize\=512m is removed in 8.0

主要是这句话“MaxPermSize=512m is removed in 8.0”,找到MaxPermSize出现的地方:在gradle.properties。
原因:
org.gradle.jvmargs=-Xmx2048m-XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
这句话的目的是:Gradle的jvm的内存分配设置。

解决办法:把它注释掉就是使用默认或者系统配置,重新try again就可以了

猜你喜欢

转载自blog.csdn.net/bobby_fu/article/details/84985673
今日推荐