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.**.*'
]
}
}
erreur Exception dans la méthode d'initialisation d'application QuantumRenderer: arrêt java.lang.RuntimeException: Exception dans la méthode d'initialisation d'application à com.sun.javafx.application.LauncherImpl.launchApplication1 (LauncherImpl.java:109069952) à com.sun.javafx.application.LauncherImpl.lambda $ launchApplication $ 156 (LauncherImpl.java:109069952) à com.sun.javafx.application.LauncherImpl $$ Lambda $ 2.run (source inconnue) à java.lang.Thread .run (Thread.java:109069952) Provoqué par: java.lang.NoSuchMethodError: com.demoapp.DemoApp $$ Lambda $ 1.() V à l'adresse 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 $ (Source inconnue) à java.lang.Thread.run (Thread.java:109070784)Lancer iOS échoue sur init. Exécute localement
Toute idée où chercher l'init-erreur lors du déploiement ..? Merci.
Init:
@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);
}
Pouvez-vous essayer avec ''com.airhacks: afterburner.mfx: 1.6.3''? –
merci pour l'indice. mais c'est toujours la même erreur. une autre idée que cela? – tonimaroni
Le plugin jfxmobile depuis 1.1.0 applique retrolambda à toutes les dépendances. Si l'un d'eux l'a déjà appliqué, il échouera. Pour vous assurer qu'aucun d'entre eux n'utilise, remplacez 'compile' par' compileNoRetrolambda' en hessian, gson et poi. Charme 4.1.0 et afterburner 1.6.3 n'utilisent pas déjà retrolambda. –