我有一个有 2 个场景的应用程序。该应用程序从第一个场景(设置为全屏模式)开始,当我点击屏幕上的一个点时,它会切换到第二个场景(也设置为全屏)。
当我在 Windows 上运行它时,它运行良好。当我在 Android 上运行它时,切换到第二个场景后出现错误。第二个场景在屏幕上短暂弹出,然后在 logcat 中出现以下异常崩溃:
java.lang.RuntimeException: Platform reported wrong touch point ID
at javafx.scene.Scene$TouchMap.get(Scene.java:5455)
at javafx.scene.Scene$ScenePeerListener.touchEventNext(Scene.java:2716)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$null$361(GlassViewEventHandler.java:1148)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.access$lambda$20(GlassViewEventHandler.java)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$23.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:52)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleNextTouchEvent$362(GlassViewEventHandler.java:1127)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.access$lambda$17(GlassViewEventHandler.java)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$20.get(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:391)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleNextTouchEvent(GlassViewEventHandler.java:1126)
at com.sun.glass.ui.View.handleNextTouchEvent(View.java:579)
at com.sun.glass.ui.View.notifyNextTouchEvent(View.java:1050)
at com.sun.glass.ui.TouchInputSupport.notifyNextTouchEvent(TouchInputSupport.java:141)
at com.sun.glass.ui.monocle.TouchInput.dispatchPoint(TouchInput.java:131)
at com.sun.glass.ui.monocle.TouchInput.lambda$postPoint$82(TouchInput.java:155)
at com.sun.glass.ui.monocle.TouchInput.access$lambda$3(TouchInput.java)
at com.sun.glass.ui.monocle.TouchInput$$Lambda$4.run(Unknown Source)
at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
at java.lang.Thread.run(Thread.java:818)
任何有关解决此问题的建议都会很棒。
这是所要求的 build.gradle 文件:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.javafxports.jfxmobile'
dependencies {
compile project(':Util')
compile files('D:/DevTools/minimal-json/minimal-json7.jar')
compile files('D:/DevTools/sqlite-jdbc/sqlite-jdbc-3.8.11.2.jar')
androidRuntime 'org.sqldroid:sqldroid:1.0.3'
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.8'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
}
mainClassName = 'com.myapp.Client'
jfxmobile {
javafxportsVersion = '8.60.7'
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
forceLinkClasses = [ 'com.myapp.**.*', 'SQLite.**.*']
infoPList = file('src/ios/Default-Info.plist')
}
}
谢谢!