我剛開始使用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嗎? –