我正在使用Java 8和gluon / roboVM为Java采用JavaFX应用程序。经过很多努力后,我设法使它在iPad Simulator上运行,但不幸的是编译后的应用程序崩溃了。现在,我需要一些想法来找出问题所在。
有什么建议吗?
我尝试将其添加到forceLinkClasses controlsfx中,但这不起作用。如您所见,我通过forceLinkClasses逐步添加了很多东西:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
mavenLocal()
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonapplication.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:5.0.2'
compile 'de.myapp.app:1.1.0-SNAPSHOT'
}
jfxmobile {
downConfig {
version = '3.8.6'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'org.slf4j.**.*',
'com.gluonhq.**.*',
'com.google.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*',
'dev.rico.**.*',
'de.myapp.app.**.*',
'com.github.rodionmoiseev.**.*',
'com.jfoenix.**.*',
'org.controlsfx.**.*',
'com.sun.javafx.**.',
'controlsfx**',
]
}
}
./gradlew clean launchIPadSimulator --refresh-dependencies
Configuration on demand is an incubating feature.
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.
> Task :GluonMobile-SingleViewProjectApp:compileIosJava
Note: /Users/joerg/Projekte/sprouts/GluonMobile-SingleViewProject/GluonMobile-SingleViewProjectApp/build/javafxports/tmp/ios/sources/org/javafxports/jfxmobile/ios/BasicLauncher.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/joerg/Projekte/sprouts/GluonMobile-SingleViewProject/GluonMobile-SingleViewProjectApp/build/javafxports/tmp/ios/sources/org/javafxports/jfxmobile/ios/BasicLauncher.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :GluonMobile-SingleViewProjectApp:launchIPadSimulator
Root pattern javax.annotations.**.* matches no classes
Root pattern controlsfx** matches no classes
Warning: java.awt.image.BufferedImage is a phantom class!
Warning: java.awt.Image is a phantom class!
Warning: javafx.embed.swing.SwingFXUtils is a phantom class!
Warning: java.awt.PopupMenu is a phantom class!
Warning: java.awt.Point is a phantom class!
Warning: javax.swing.JMenuBar is a phantom class!
javax.xml.stream.XMLEventFactory=com.sun.xml.stream.events.ZephyrEvent...
java.vendor.url=http://www.robovm.org/
java.ext.dirs=
line.separator=
file.encoding=UTF-8
java.runtime.version=0.9
user.name=mobile
java.compiler=
prism.static.libraries=true
android.icu.unicode.version=6.2
javax.xml.stream.XMLOutputFactory=com.sun.xml.stream.ZephyrWriterFactory
java.version=0
android.icu.library.version=51.1.0.1
os.arch=x86_64
java.io.tmpdir=/Users/joerg/Library/Developer/CoreSi...
glass.platform=ios
android.zlib.version=1.2.8
user.language=en
java.vm.version=2.3.5-SNAPSHOT
com.sun.javafx.isEmbedded=true
javax.xml.stream.XMLInputFactory=com.sun.xml.stream.ZephyrParserFactory
path.separator=:
java.runtime.name=RoboVM Runtime
java.specification.version=0.9
user.dir=/Users/joerg/Library/Developer/CoreSi...
java.vm.specification.vendor=RoboVM
java.vm.name=RoboVM
java.vm.specification.version=0.9
prism.useNativeIIO=false
user.home=/Users/joerg/Library/Developer/CoreSi...
jfxmedia.platforms=IOSPlatform
java.specification.name=RoboVM Core Library
file.separator=/
user.variant=
os.version=10.14.3
java.boot.class.path=/Users/joerg/Library/Developer/CoreSi...
java.vm.specification.name=RoboVM Virtual Machine Specification
javafx.platform=ios
user.region=US
os.name=iOS Simulator
java.class.path=/Users/joerg/Library/Developer/CoreSi...
prism.verbose=true
java.specification.vendor=RoboVM
java.vm.vendor=RoboVM
prism.mintexturesize=16
prism.allowhidpi=true
java.vendor=RoboVM
android.icu.cldr.version=23.0
android.openssl.version=OpenSSL 1.0.1e 11 Feb 2013
java.home=/Users/joerg/Library/Developer/CoreSi...
java.vm.vendor.url=http://www.robovm.org/
java.class.version=50.0
Prism pipeline init order: es2
Using native-based Pisces rasterizer
Using dirty region optimizations
Using system sized mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
succeeded.
GLFactory using com.sun.prism.es2.IOSGLFactory
IOSWindowSystemInterface : share 0 view 0 pf otready
GL_VERSION string = OpenGL ES 2.0 APPLE-17.0.37
GL_VERSION (major.minor) = 0.0
(X) Got class = class com.sun.prism.es2.ES2Pipeline
initialize() returns 140294095934848
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
IOSWindowSystemInterface : share 285c3e0 view 0 pf otready
GL_VERSION string = OpenGL ES 2.0 APPLE-17.0.37
GL_VERSION (major.minor) = 0.0
CTXINFO vendor
CTXINFO renderer
CTXINFO glExtensions
CTXINFO GL_ARB_pixel_buffer_object
CTXINFO allocate the structure
CTXINFO set function pointers
Attributes = onScreen: trueredSize : 8, greenSize : 8, blueSize : 8, alphaSize : 8, depthSize : 24, doubleBuffer : true
initialize() returns 140294099043712
IOSWindowSystemInterface : share 285c3e0 view 0 pf otready
GL_VERSION string = OpenGL ES 2.0 APPLE-17.0.37
GL_VERSION (major.minor) = 0.0
CTXINFO vendor
CTXINFO renderer
CTXINFO glExtensions
CTXINFO GL_ARB_pixel_buffer_object
CTXINFO allocate the structure
CTXINFO set function pointers
Attributes = onScreen: trueredSize : 8, greenSize : 8, blueSize : 8, alphaSize : 8, depthSize : 24, doubleBuffer : true
initialize() returns 140294095947936
Maximum supported texture size: 4096
Non power of two texture support = false
Maximum number of vertex attributes = 16
Maximum number of uniform vertex components = 512
Maximum number of uniform fragment components = 256
Maximum number of varying components = 32
Maximum number of texture units usable in a vertex shader = 8
Maximum number of texture units usable in a fragment shader = 8
Graphics Vendor: Apple Inc.
Renderer: Apple Software Renderer
Version: OpenGL ES 2.0 APPLE-17.0.37
vsync: true vpipe: true
AAAAAAA1
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
[WARN] java.lang.Class: Class.forName() failed to load 'javax.servlet.Servlet'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>javax.servlet.Servlet</pattern></forceLinkClasses> to your robovm.xml file to link it in.
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
[WARN] java.lang.Class: Class.forName() failed to load 'org.slf4j.ext.EventData'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>org.slf4j.ext.EventData</pattern></forceLinkClasses> to your robovm.xml file to link it in.
____________________________________________________________________________________
| _____ _ __ _ |
| | __ \(_) / _| _ _ __ _ _ __ ___ __ __ __ ___ _ _ | |__ |
| | |__) |_ ___ ___ | _|| '_|/ _` || ' \ / -_)\ V V // _ \| '_|| / / |
| | _ /| |/ __/ _ \ | | |_| \__,_||_|_|_|\___| \_/\_/ \___/|_| | \ \ |
| | | \ \| | (_| (_) | | | | |\ \ |
| |_| \_\_|\___\___/ |_| Version $version | by dev.karakun.com |_| \_\ |
|__________________________________________________________________________________|
[WARN] java.lang.Class: Class.forName() failed to load 'org.slf4j.ext.EventData'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>org.slf4j.ext.EventData</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'org.slf4j.ext.EventData'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>org.slf4j.ext.EventData</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'org.slf4j.ext.EventData'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>org.slf4j.ext.EventData</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'org.slf4j.ext.EventData'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>org.slf4j.ext.EventData</pattern></forceLinkClasses> to your robovm.xml file to link it in.
AAAAAAA2
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.font.t2k.T2KFactory'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.font.t2k.T2KFactory</pattern></forceLinkClasses> to your robovm.xml file to link it in.
2019-03-07 17:01:50.526 GluonMobile-SingleViewProjectApp[8524:941891] Done creating private storage /Users/joerg/Library/Developer/CoreSimulator/Devices/B9A4EAA3-3F23-4EBC-9C08-08CD4180ECBA/data/Containers/Data/Application/F496D07F-DB90-4A86-BE14-2BB9E5EE8F0A/Library/gluon
HELL!!!_3a
HELL!!!_4
[WARN] java.lang.Class: Class.forName() failed to load 'de.myapp.app.office.login.login_en_US'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>de.myapp.app.office.login.login_en_US</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'de.myapp.app.office.login.login_en'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>de.myapp.app.office.login.login_en</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'de.myapp.app.office.login.login'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>de.myapp.app.office.login.login</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'javax.xml.stream.FactoryFinder$ClassLoaderFinderConcrete'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>javax.xml.stream.FactoryFinder$ClassLoaderFinderConcrete</pattern></forceLinkClasses> to your robovm.xml file to link it in.
bbbb1
HELL!!!_3a
[WARN] java.lang.Class: Class.forName() failed to load 'controlsfx_en_US'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>controlsfx_en_US</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'controlsfx_en'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>controlsfx_en</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'controlsfx'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>controlsfx</pattern></forceLinkClasses> to your robovm.xml file to link it in.
HELL!!!_5
AAAAAAA3
AAAAAAA4
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.tk.quantum.QuantumMessagesBundle_en_US'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.tk.quantum.QuantumMessagesBundle_en_US</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.tk.quantum.QuantumMessagesBundle_en'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.tk.quantum.QuantumMessagesBundle_en</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.tk.quantum.QuantumMessagesBundle'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.tk.quantum.QuantumMessagesBundle</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.oracle.jrockit.jfr.FlightRecorder'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.oracle.jrockit.jfr.FlightRecorder</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.scene.control.skin.resources.controls_en_US'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.scene.control.skin.resources.controls_en_US</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.scene.control.skin.resources.controls_en'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.scene.control.skin.resources.controls_en</pattern></forceLinkClasses> to your robovm.xml file to link it in.
[WARN] java.lang.Class: Class.forName() failed to load 'com.sun.javafx.scene.control.skin.resources.controls'. Use the -forcelinkclasses command line option or add <forceLinkClasses><pattern>com.sun.javafx.scene.control.skin.resources.controls</pattern></forceLinkClasses> to your robovm.xml file to link it in.
BUILD SUCCESSFUL in 1m 31s
8 actionable tasks: 7 executed, 1 up-to-date