buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.1.1'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'https://mvnrepository.com/artifact/com.caucho/hessian'
}
maven {
url'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.demoapp.DemoApp'
dependencies {
compile 'com.gluonhq:charm:4.1.0'
compile 'com.airhacks:afterburner.mfx:1.6.2'
compile 'com.caucho:hessian:4.0.7'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.apache.poi:poi:3.9'
}
jfxmobile {
downConfig {
version '3.0.0'
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.demoapp.**.*',
'com.gluonhq.**.*',
'io.datafx.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*',
'com.caucho.**.*',
'com.google.code.gson.**.*',
'org.apache.poi.**.*'
]
}
}
錯誤異常 QuantumRenderer:關機 了java.lang.RuntimeException:異常中的應用init方法 在com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:109069952) at com.sun.javafx.application.LauncherImpl.lambda $ launchApplication $ 156(LauncherImpl.java:109069952) at com.sun.javafx.application.LauncherImpl $$ Lambda $ 2.run(未知來源) at java.lang.Thread .run(Thread.java:109069952) 由於:java.lang.NoSuchMethodError:com.demoapp.DemoApp $$ Lambda $ 1。()V at com.demoapp.DemoApp.init(DemoApp.java:109070784) 在com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:109070784) 在com.sun.javafx.application.LauncherImpl.lambda $ launchApplication $ 156(LauncherImpl.java:109070784) 在com.sun.javafx .application.LauncherImpl $$ Lambda $ 2.run(Unknown Source) at java.lang.Thread.run(Thread.java:109070784)啓動iOS在初始化時失敗。本地運行在應用init方法
任何想法當部署..時,在哪裏搜索init-error?謝謝。
初始化:
@Override
public void init() {
NavigationDrawer drawer = new NavigationDrawer();
NavigationDrawer.Header header = new NavigationDrawer.Header("demo inc", "smart teamwork", new Avatar(21, new Image(DemoApp.class.getResourceAsStream("/icon.png"))));
drawer.setHeader(header);
drawer.getItems().addAll(primaryItem, secondaryItem, thirdItem);
primaryItem.setSelected(true);
addViewFactory(PRIMARY_VIEW,() -> (View) new PrimaryView().getView());
addViewFactory(SECONDARY_VIEW,() -> (View) new SecondaryView().getView());
addViewFactory(THIRD_VIEW,() -> (View) new ThirdView().getView());
addLayerFactory(MENU_LAYER,() -> new SidePopupView(drawer));
}
@Override
public void postInit(Scene scene) {
Swatch.ORANGE.assignTo(scene);
scene.getStylesheets().add(DemoApp.class.getResource("style.css").toExternalForm());
((Stage) scene.getWindow()).getIcons().add(new Image(DemoApp.class.getResourceAsStream("/icon.png")));
switchView(SECONDARY_VIEW);
}
你可以試試'com.airhacks:afterburner.mfx:1.6.3'嗎? –
感謝您的提示。但它仍然是一樣的錯誤。除此之外的任何其他想法? – tonimaroni
1.1.0以來的jfxmobile插件將retrolambda應用於所有依賴關係。如果它們中的任何一個已經應用了將會失敗。爲了確保它們都不使用,用'compileNoRetrolambda'替換'compile',使用hessian,gson和poi。魅力4.1.0和加力燃燒1.6.3不使用retrolambda已經。 –