gpt4 book ai didi

java - Gluon 应用程序无法在 iOS 上启动

转载 作者:行者123 更新时间:2023-12-01 10:11:02 25 4
gpt4 key购买 nike

Google 并没有多大帮助。

Mar 20, 2016 9:00:13 AM com.gluonhq.charm.down.common.PlatformFactory getPlatform
SEVERE: null
Throwable occurred: java.lang.ClassNotFoundException: com.gluonhq.charm.down.ios.IOSPlatform
at java.lang.VMClassLoader.findClassInClasspathForLoader(Native Method)
at java.lang.PathClassLoader.findClass(PathClassLoader.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java)
at java.lang.Class.classForName(Native Method)
QuantumRenderer: shutdown
at java.lang.Class.forName(Class.java)
at java.lang.Class.forName(Class.java)
at com.gluonhq.charm.down.common.PlatformFactory.getPlatform(PlatformFactory.java)
at com.gluonhq.charm.glisten.application.MobileApplication.start(SourceFile)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java)
at com.sun.javafx.application.LauncherImpl$$Lambda$9.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$7.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at org.javafxports.jfxmobile.ios.BasicLauncher.main(BasicLauncher.java)

Exception in Application start method

java.lang.RuntimeException: Exception in Application start method

at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java)
at com.sun.javafx.application.LauncherImpl$$Lambda$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java)
Caused by: java.lang.NullPointerException
at com.gluonhq.charm.glisten.application.MobileApplication.start(SourceFile)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java)
at com.sun.javafx.application.LauncherImpl$$Lambda$9.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$7.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)

at java.security.AccessController.doPrivileged(AccessController.java)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at org.javafxports.jfxmobile.ios.BasicLauncher.main(BasicLauncher.java)

这是build.gradle文件:

buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'net.linguica.gradle:maven-settings-plugin:0.5'
classpath 'org.javafxports:jfxmobile-plugin:1.0.7'
}
}

plugins {
id "net.linguica.maven-settings" version "0.5" // make maven settings.xml available in gradle (and automatically setup the security settings for the repos based on the grable name vs maven id
}

apply plugin: 'org.javafxports.jfxmobile'

configurations {
provided
}

repositories {
mavenLocal()
mavenCentral()
maven { url 'http://oss.sonatype.org/content/groups/public/' }
jcenter()
maven { url 'http://nexus.gluonhq.com/nexus/content/repositories/releases/' }
}

sourceSets {
main {
compileClasspath += configurations.provided
}
}

dependencies {
compile ('nl.knowledgeplaza:DH2RIAShared:1.55-SNAPSHOT') {
exclude module: 'hessian'
}
compile 'blog.monkeyboy:hessian-android:1.0'

compile 'org.jfxtras:jfxtras-controls:8.0-r5-SNAPSHOT'
compile 'com.miglayout:miglayout-javafx:5.1-SNAPSHOT'
compile 'de.jensd:fontawesomefx:8.9-retrolambda'

compile 'joda-time:joda-time:2.9.2'

compile 'com.gluonhq:charm:2.1.0'
androidRuntime 'com.gluonhq:charm-android:2.1.0'
iosRuntime 'com.gluonhq:charm-ios:2.1.0'
desktopRuntime 'com.gluonhq:charm-desktop:2.1.0'
}

mainClassName = 'nl.softworks.dh2.dh2fx.DH2FX'

retrolambda {
defaultMethods true
}

jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
packagingOptions {
pickFirst 'roboto/Apache License.txt'
}
dexOptions {
javaMaxHeapSize = '1024m'
}
}
ios {
infoPList = file('src/ios/Default-Info.plist')
}
}

最佳答案

在 iOS 上部署时,需要使用 forceLinkClasses command ,因此 RoboVM 可以在编译期间链接这些包中包含的类。

您需要在包中包含类,以及您可能使用的任何第三个依赖项上的类:

jfxmobile {
ios {
forceLinkClasses = [ 'nl.softwork.**.*',
'com.gluonhq.**.*',
'org.jfxtras.**.*',
... ]
infoPList = file('src/ios/Default-Info.plist')
}
}

关于java - Gluon 应用程序无法在 iOS 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36111926/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com