libGDX 使用中问题解决

最近在使用libGDX的过程中遇到了一点问题:
1471745-20181127222030303-431675548.png


在使用官方的构建工具时,项目构建过程中出现下列错误提示:

Generating app in C:\Users\Aaron\Desktop\test
Executing 'C:\Users\Aaron\Desktop\test/gradlew.bat clean --no-daemon eclipse afterEclipseImport'
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.6/userguide/gradle_daemon.html.

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 1536000KB 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.org
Done!
To import in Eclipse: File -> Import -> General -> Existing Projects into Workspace
To import to Intellij IDEA: File -> Open -> YourProject.ipr

1471745-20181127222041804-1727822026.png

在一番搜索之后,发现国内暂时没有这方面的博文,但是一篇关于Android studio中遇到 :

Error occurred during initialization of VM

这个错误的处理方法启发了我。


解决方法:
在 C:\Users\Aaron.gradle 该目录下新建 gradle.properties 文件,内容为

org.gradle.jvmargs=-Xmx512m

然后重启构建工具,再次构建,最终成功!

1471745-20181127222119240-1767734688.png

转载于:https://www.cnblogs.com/CoderAnan/p/10029481.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值