android - 在类路径上找不到 /javafx.platform.properties
问题描述
上个月我为安卓手机构建了许多胶子应用程序。他们在工作。但是现在,当我使用相同的方式构建 apk 时,它们无法正常工作,并在 android 手机上生成此错误,
Unfortunately GluonSingleViewApp has stopped.
我在这个问题上搜索了大约两周,但没有找到任何解决方案。现在我需要你的帮助社区。
在构建了许多项目(包括 gluon 提供的示例、netbeans gluon 示例项目和失败)之后,我遵循了简单的方法。
在 netbeans 中,我制作了简单的新GluonSingleView
应用程序并应用task
> android
> androidInstall
。
当我在移动设备中运行应用程序时,它显示错误
Unfortunately GluonSingleViewApp has stopped.
我没有更改我的 gradle.build 文件中的任何内容。
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.12'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonsingleviewapp.GluonSingleViewApp'
dependencies {
compile 'com.gluonhq:charm:5.0.0'
}
jfxmobile {
downConfig {
version = '3.8.0'
// 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'
}
}
这是Android Monitor生成的LogCat
FATAL EXCEPTION: main
Process: com.gluonsingleviewapp, PID: 14831
java.lang.RuntimeException: Did not create correct launcher.
at javafxports.android.FXDalvikEntity.getLauncherAndLaunchApplication(FXDalvikEntity.java:165)
at javafxports.android.FXDalvikEntity.surfaceCreated(FXDalvikEntity.java:304)
at android.view.SurfaceView.updateWindow(SurfaceView.java:712)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:209)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1014)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2510)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
at android.view.Choreographer.doCallbacks(Choreographer.java:695)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.RuntimeException: Could not find /javafx.platform.properties on classpath.
at javafxports.android.DalvikLauncher.launchApp(DalvikLauncher.java:81)
at javafxports.android.FXDalvikEntity.getLauncherAndLaunchApplication(FXDalvikEntity.java:162)
... 18 more
解决方案
推荐阅读
- arrays - 有没有一种有效的方法可以按顺序从排序的向量中删除元素?
- c++ - 当结构是赋值的右值时,返回结构内变量的值
- python - 如何使用 Keras 的深度学习模型解决不适合 imagenet 数据集的问题?
- postgresql - Postgres Timescale DB 中的更新
- android - flutter build apk --split-per-abi:app-armeabi-v7a-release.apk和app.apk有什么区别
- reactjs - 样式不适用于 css 组合器 + 带有 makeStyles() material-ui 的伪类
- c++ - 更新后 OpenCV Cpp 代码未在 Ubuntu 20.04 中运行
- python-3.x - Selenium 点击循环忽略了一些值
- python - 为什么在弹性搜索中点击 api 时索引会继续创建
- r - 尝试使用 Rticles 生成示例 R 降价时出错:找不到 pdflatex Ubuntu 20.04