MacOS,Eclipse 4.7 + Gluon插件,Java 9
使用GluonVM创建了一个简单的演示应用程序,并尝试启动IPhoneSimulator:
过一会儿,出现StackOverflowError:
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.StackOverflowError
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)
答案 0 :(得分:1)
从Gluon VM启动时,请检查此doc以了解已知问题。
也请检查此readme,以获得有关如何开始使用Gluon VM的jfxmobile插件2.0.29+的提示。
如您在iOS的项目符号4中所见,
强烈建议通过在〜/ .gradle / gradle.properties文件中添加以下选项来增加Java堆栈的大小。
编辑/Users/<your user>/.gradle/gradle.properties
文件并添加:
org.gradle.jvmargs=-Xms256m -Xmx4096m -Xss2m
还要确保您正在运行最新版本的插件。
检查您的build.gradle
文件是否在使用:
classpath 'org.javafxports:jfxmobile-plugin:2.0.29'
现在重试launchIPhoneSimulator
任务。
也请注意此注释:
该插件首次运行iOS任务时,将需要很长时间(超过15分钟)提前编译所有Java模块。成功完成此操作后,所有这些模块都将在本地缓存(〜/ .gvm / aot),因此下一次运行将缩短(只需几分钟)。