我刚开始使用FXML创建一个新的胶子移动多视图项目,并试图在更改任何内容之前运行它(除了将build.gradle文件中的jfxmobile插件版本更新为1.2.0至1.3.2)。它在桌面上工作正常,但是当我尝试运行androidinstall gradle任务(连接我的android手机)时失败。它给了我下面的错误:使用胶子移动插件构建JavaFX android应用程序失败
:mergeClassesIntoJar
:shrinkMultiDexComponents
:createMainDexList
:writeInputListFile
[ant:java] Java Result: 1
:dex FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dex'.
> org.gradle.api.GradleException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
我的build.gradle文件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.2'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonapplication.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:4.2.0'
}
jfxmobile {
downConfig {
version = '3.1.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'
}
}
操作系统:Windows 10
请让我知道是否需要任何额外的信息来确定问题的原因。谢谢。
gradlew --info的Android日志:
你可以运行'gradlew.bat --info android'并发布日志? –
感谢您的快速回复。我在我的文章中添加了日志(由于此站点上的字符限制使用了pastebin)。我也跟着提出的解决方案,在这篇文章http://stackoverflow.com/questions/30473854/error-after-running-the-default-gluon-project-dex-failed没有运气。 – Jonathan
您正在64位操作系统上运行32位JDK版本,不是吗?你可以试试64位JDK吗? –