无法构建 iOS 应用程序 (StackOverflowError)
Building iOS application not possible (StackOverflowError)
MacOS,Eclipse 4.7 + Gluon 插件,Java9
使用 GluonVM 创建了一个简单的演示应用程序并尝试启动 iPhoneSimulator:
过了一会儿,WhosebugError 出现了:
Working Directory: /tools/eclipse_workspace/MobileTest/MobileTestApp
Gradle User Home: /Users/rjahn/.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 4.3.1
Java Home: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: launchIPhoneSimulator
:MobileTestApp:compileJava UP-TO-DATE
:MobileTestApp:processResources UP-TO-DATE
:MobileTestApp:classes UP-TO-DATE
:MobileTestApp:compileIosJava NO-SOURCE
:MobileTestApp:processIosResources NO-SOURCE
:MobileTestApp:iosClasses UP-TO-DATE
:MobileTestApp:launchIPhoneSimulatorSetting gloal LogLevel to INFO
Configure logging for GVM tooling... BUNDLE ID = com.sibvisions.mobile.test.Application
[HIGGS] Creating higgs...
[09:13:23:597] com.gluonhq.higgs.Higgs: [HIGGS] mainClassName = com/sibvisions/mobile/test/Application
[09:13:23:624] com.gluonhq.higgs.Higgs: [HIGGS] arch = x86_64
missing file /tools/eclipse_workspace/MobileTest/MobileTestApp/build/classes/java/ios
[09:13:24:855] com.gluonhq.higgs.Compiler: compilation, round 0
[09:13:24:856] com.gluonhq.higgs.Higgs: Still compiling... 11173 classes left.
[09:13:34:857] com.gluonhq.higgs.Higgs: Still compiling... 4375 classes left.
[09:13:41:107] com.gluonhq.higgs.Compiler: halfway done round 0
[09:13:41:426] com.gluonhq.higgs.Compiler: done round 0
[09:13:41:427] com.gluonhq.higgs.Compiler: compilation, round 1
[09:13:44:858] com.gluonhq.higgs.Higgs: Still compiling... 488 classes left.
[09:13:45:262] com.gluonhq.higgs.Compiler: halfway done round 1
java.lang.WhosebugError
at java.base/java.util.HashMap.putVal(HashMap.java:631)
at java.base/java.util.HashMap.put(HashMap.java:612)
at java.base/java.util.HashSet.add(HashSet.java:220)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:170)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
检查此 doc 以了解启动 Gluon VM 时的已知问题。
另请查看此 readme,了解有关如何开始使用适用于 Gluon VM 的 jfxmobile 插件 2.0.29+ 的提示。
正如您在 iOS、
的项目符号 4 中看到的
It is highly recommended to increase the Java stack size, by adding the following option to the ~/.gradle/gradle.properties file.
编辑 /Users/<your user>/.gradle/gradle.properties
文件并添加:
org.gradle.jvmargs=-Xms256m -Xmx4096m -Xss2m
还要确保您是 运行 最新版本的插件。
检查您的 build.gradle
文件是否正在使用:
classpath 'org.javafxports:jfxmobile-plugin:2.0.29'
现在重试 launchIPhoneSimulator
任务。
也请注意此注释:
The first time the plugin runs an iOS task, it will take a long time (more than 15 minutes) to ahead-of-time compile all the Java modules. After this finishes successfully, all these modules are cached locally (~/.gvm/aot), so the next runs will be shorter (just a few minutes).
MacOS,Eclipse 4.7 + Gluon 插件,Java9
使用 GluonVM 创建了一个简单的演示应用程序并尝试启动 iPhoneSimulator:
过了一会儿,WhosebugError 出现了:
Working Directory: /tools/eclipse_workspace/MobileTest/MobileTestApp
Gradle User Home: /Users/rjahn/.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 4.3.1
Java Home: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: launchIPhoneSimulator
:MobileTestApp:compileJava UP-TO-DATE
:MobileTestApp:processResources UP-TO-DATE
:MobileTestApp:classes UP-TO-DATE
:MobileTestApp:compileIosJava NO-SOURCE
:MobileTestApp:processIosResources NO-SOURCE
:MobileTestApp:iosClasses UP-TO-DATE
:MobileTestApp:launchIPhoneSimulatorSetting gloal LogLevel to INFO
Configure logging for GVM tooling... BUNDLE ID = com.sibvisions.mobile.test.Application
[HIGGS] Creating higgs...
[09:13:23:597] com.gluonhq.higgs.Higgs: [HIGGS] mainClassName = com/sibvisions/mobile/test/Application
[09:13:23:624] com.gluonhq.higgs.Higgs: [HIGGS] arch = x86_64
missing file /tools/eclipse_workspace/MobileTest/MobileTestApp/build/classes/java/ios
[09:13:24:855] com.gluonhq.higgs.Compiler: compilation, round 0
[09:13:24:856] com.gluonhq.higgs.Higgs: Still compiling... 11173 classes left.
[09:13:34:857] com.gluonhq.higgs.Higgs: Still compiling... 4375 classes left.
[09:13:41:107] com.gluonhq.higgs.Compiler: halfway done round 0
[09:13:41:426] com.gluonhq.higgs.Compiler: done round 0
[09:13:41:427] com.gluonhq.higgs.Compiler: compilation, round 1
[09:13:44:858] com.gluonhq.higgs.Higgs: Still compiling... 488 classes left.
[09:13:45:262] com.gluonhq.higgs.Compiler: halfway done round 1
java.lang.WhosebugError
at java.base/java.util.HashMap.putVal(HashMap.java:631)
at java.base/java.util.HashMap.put(HashMap.java:612)
at java.base/java.util.HashSet.add(HashSet.java:220)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:170)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
at com.gluonhq.higgs.DependencyGraph.visitReachableNodes(DependencyGraph.java:173)
检查此 doc 以了解启动 Gluon VM 时的已知问题。
另请查看此 readme,了解有关如何开始使用适用于 Gluon VM 的 jfxmobile 插件 2.0.29+ 的提示。
正如您在 iOS、
的项目符号 4 中看到的It is highly recommended to increase the Java stack size, by adding the following option to the ~/.gradle/gradle.properties file.
编辑 /Users/<your user>/.gradle/gradle.properties
文件并添加:
org.gradle.jvmargs=-Xms256m -Xmx4096m -Xss2m
还要确保您是 运行 最新版本的插件。
检查您的 build.gradle
文件是否正在使用:
classpath 'org.javafxports:jfxmobile-plugin:2.0.29'
现在重试 launchIPhoneSimulator
任务。
也请注意此注释:
The first time the plugin runs an iOS task, it will take a long time (more than 15 minutes) to ahead-of-time compile all the Java modules. After this finishes successfully, all these modules are cached locally (~/.gvm/aot), so the next runs will be shorter (just a few minutes).