簡體   English   中英

Gluon Mobile無法移植到iOS

[英]Gluon Mobile Not Being Able to Port to iOS

我正在研究此應用程序,但似乎無法將其移植到iOS。 嘗試在iOS上構建應用程序時,我一遍又一遍地遇到OutOfMemory異常。

然后,我嘗試構建一個基本的Gluon Mobile應用程序並將其移植到iOS,我得到了:

:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:createDefaultIOSLauncher UP-TO-DATE
:compileIosJava UP-TO-DATE
:processIosResources UP-TO-DATE
:iosClasses UP-TO-DATE
:iosExtractNativeLibs UP-TO-DATE
: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
Root pattern javax.annotations.**.* matches no classes
Root pattern javax.inject.**.* matches no classes
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
Root pattern javax.annotations.**.* matches no classes
Root pattern javax.inject.**.* matches no classes
Warning: javax.xml.bind.annotation.XmlRootElement is a phantom class!
Warning: java.nio.file.StandardOpenOption is a phantom class!
Warning: java.nio.file.FileSystem is a phantom class!
Warning: java.nio.file.OpenOption is a phantom class!
Warning: java.nio.file.FileSystems is a phantom class!
Warning: com.oracle.jrockit.jfr.TimedEvent is a phantom class!
Warning: com.oracle.jrockit.jfr.EventToken is a phantom class!
Warning: com.oracle.jrockit.jfr.ValueDefinition is a phantom class!
Warning: com.oracle.jrockit.jfr.EventDefinition is a phantom class!
Warning: com.oracle.jrockit.jfr.Producer is a phantom class!
Warning: com.oracle.jrockit.jfr.FlightRecorder is a phantom class!
Daemon stopping because JVM tenured space is exhausted
Daemon stopping because JVM tenured space is exhausted

我的IMac 在2.7GHz I5上運行8GB RAM。

我也嘗試安裝RoboVM RAM磁盤未成功。 請幫忙!

通常,iOS部署需要大量內存,並且默認情況下,將JVM堆的最大分配內存池增加到2 GB是一種很好的做法。

從IDE運行,您可以在Gradle首選項中設置此默認值。

例如,在NetBeans上,轉到Preferences-> Miscellaneous-> Gradle,Scripts&Tasks,然后在Gradle JVM參數中添加-Xmx2048m

Gradle參數

另一種選擇是在gradle.properties文件中設置gradle屬性(在<user>/.gradle下具有ANDROID_HOME屬性的屬性):

org.gradle.jvmargs=-Xmx2048m

該屬性文件將應用於從IDE運行或從命令行運行,因此更合適。

發現內存不足錯誤的典型情況是第一次啟動RoboVM編譯器。 幸運的是,所有已編譯的類都已緩存,因此重新啟動任務只會恢復該過程。

另外,如果該過程失敗,有時可以很方便地使用gradle --stop./gradlew --stop停止所有gradle --stop進程線程,然后重新啟動任務。

如果該過程成功結束,即使有警告消息,也只需在您的iOS設備上檢查該應用程序已安裝並運行正常。 請注意,您也可能會發現內存問題,但這是一個不同的問題。

編輯

當執行長任務時,使用--info查找有關該過程的更多信息總是很方便,並且輸出更為詳細。

另外,可以從控制台運行該過程(從NetBeans中,右鍵單擊build.gradle文件,然后選擇“工具”->“在終端中打開”)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM