This problem might be caused by incorrect configuration of the daemon.

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.org/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 2097152KB object heap
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0

 

 

这个问题是我在使用gradlew的时候遇到的

gradlew在项目根目录下才有效

Android Studio 中 gradle 构建 堆栈空间不足,所以将其设置小一点即可,一般为1024或者512都可以,自己设置测试为准

org.gradle.jvmargs=-Xmx1024m

 

参考https://cloud.tencent.com/developer/article/1591848

posted @ 2022-08-09 10:40  only_books  阅读(1258)  评论(0编辑  收藏  举报