admin管理员组文章数量:1619183
这是一个在项目中Module打包出一个JAR包时出现的错误:
错误信息:
Microsoft Windows [版本 10.0.18363.959]
(c) 2019 Microsoft Corporation。保留所有权利。
D:\serviceT>gradlew makeJar
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
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/4.6/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle
仔细看错屋信息找到关键的信息:Could not reserve enough space for 1572864KB object heap 就是这一句翻译就是:无法为1572864KB的对象堆预留足够的空间。没有足够的控件。
我的解决办法:
看图:找到项目中 gradle.properties里的 org.gradle.jvmargs=-Xmx1536m
然后更换为: org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
如图:
这样将空间扩大得到解决。
-END
本文标签: failureAndroidStudioBuildExceptionfailed
版权声明:本文标题:AndroidStudio之FAILURE: Build failed with an exception 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1728784927a1173203.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论