Android Studio报错

来源:互联网 发布:淘宝超低价宝贝集锦 编辑:程序博客网 时间:2024/05/17 14:18
Error: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.12/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.


报错说堆栈空间不足,看了网上的说法是要修改gradle.properties文件,但是到C:\Users\【用户名】\.gradle目录下并没有这个文件,也就说需要自己建立。注意,.properties文件虽然是以TXT格式打开的,但是不是说建立一个txt文件起名叫gradle就行啊!Android Studio没找到新建properties文件的方法,不要紧,找一个properties文件拷过去不就有这个类型的文件了吗。。所以可以直接把Android Studio安装路径下的bin文件夹(例如我的是在F:\Android\AndroidStudio\bin)下的一个已有的idea.properties文件拷到C:\Users\【用户名】\.gradle目录下,把内容改为org.gradle.jvmargs=-Xmx512m,把文件名的idea改为gradle就行啦~~

0 0