我使用Android Studio 2.1.2和模拟器来运行我的应用程序,我在构建应用程序时遇到以下错误。 错误:无法完成Gradle执行。
Cause:
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 https://docs.gradle.org/2.10/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid maximum heap size: -XX:MaxHeapSize=4096m
The specified size exceeds the maximum representable size.
仿真器内存和存储设置:
RAM : 1GB
VM Heap : 64MB
在Gradle.properties文件中添加以下行:
org.gradle.jvmargs=-XX\:MaxHeapSize\=4096m -Xmx4096m
我的系统配置:
I have 8GB RAM in my system.
我的问题是无法使用模拟器构建/运行我的应用程序并获得上述错误。请帮忙解决这个问题。
答案 0 :(得分:0)
如果你在Windows上
<icon path="{{url('img/admin/add.png') }}" name="" remove="remove"></icon>
将-Xms128m增加到-Xms512m并重新启动Android Studio。
了解更多解决方案,请查看此答案