ios:createIPA gradle任务因HfsCompressor.compressNative中的错误而失败

时间:2016-07-22 11:14:46

标签: ios libgdx robovm

使用./gradlew ios:createIPA从命令行构建iOS的libGDX游戏时,我有时会收到以下错误:

...
:ios_lite:createIPA
RoboVM has detected that you are running on a slow HDD. Please consider mounting a RAM disk.
To create a 2GB RAM disk, run this in your terminal:
SIZE=2048 ; diskutil erasevolume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE * 2048))`
See http://docs.robovm.com/ for more info
RoboVM has detected that you are running on a slow HDD. Please consider mounting a RAM disk.
To create a 2GB RAM disk, run this in your terminal:
SIZE=2048 ; diskutil erasevolume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE * 2048))`
See http://docs.robovm.com/ for more info
:ios_lite:createIPA FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ios_lite:createIPA'.
> org.robovm.compiler.util.io.HfsCompressor.compressNative(Ljava/lang/String;[BI)Z

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

--info--debug提供了更多输出,但没有更多有用的信息,--stacktrace只显示Gradle中的内部堆栈跟踪。

使用Gradle 2.2,OS X 10.11.5,JVM 1.8.0_74,RoboVM 1.12.0。

导致此错误的原因是什么,我该如何解决?

1 个答案:

答案 0 :(得分:0)

我仍然不知道是什么导致它(在这方面更好的答案欢迎),但我找到了一个解决方法:重新启动Gradle守护程序。在构建之前,只需运行:

$ ./gradlew --stop

守护程序将自动重新启动以进行下一次构建。到目前为止,这种解决方法已经为我可靠地修复了错误。