キーボードから TextField に文字を入力すると、最新の JavaFXPorts 8.60.7 で問題が発生し、アプリがクラッシュします。私はアンドロイド5.0.1を使用しています。以前、私のアプリは JavaFXPorts 8.60.6 で開発され、そこで私のアプリは動作していました。8.60.6 では、TextField に文字を入力できました。
logcat に次のエラーが表示されます。
04-15 21:56:22.066 10732-10769/? E/AndroidRuntime: FATAL EXCEPTION: JavaFX Application Thread
Process: pl.plf.myapp, PID: 10732
java.lang.NoSuchMethodError: No static method dispatchKeyEvent(II[CI)V in class Lcom/sun/glass/ui/monocle/AndroidInputDeviceRegistry; or its super classes (declaration of 'com.sun.glass.ui.monocle.AndroidInputDeviceRegistry' appears in /data/app/pl.plf.myapp-1/base.apk)
at javafxports.android.KeyEventProcessor$1.run(KeyEventProcessor.java:53)
at com.sun.javafx.application.PlatformImpl.lambda$null$155(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl.access$lambda$18(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:52)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$156(PlatformImpl.java:294)
at com.sun.javafx.application.PlatformImpl.access$lambda$5(PlatformImpl.java)
at com.sun.javafx.application.PlatformImpl$$Lambda$6.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: 'war'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '1.0'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.8'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
mavenCentral()
}
dependencies {
compile project(":ApiCore")
compile project(":Validation")
compile project(":PLFModel")
compile 'org.javafxports:jfxdvk:8.60.7'
compile fileTree(dir: 'libs', include: '*.jar')
runtime fileTree(dir: 'libs', include: '*.jar')
}
mainClassName = 'pl.plf.myapp.MainApp'
jfxmobile {
android {
javafxportsVersion = '8.60.7'
manifest = 'src/android/AndroidManifest.xml'
androidSdk = '/home/user/Android/Sdk'
packagingOptions {
exclude 'META-INF/notice.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
}
助けてくれてありがとう。