- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我下载了适用于 Netbeans 的 Gluon 插件,用于将 JavaFX 应用程序部署到 Android。它在桌面上成功运行,但是当我执行 android
任务时,它抛出错误:
Executing: gradle :android
:compileJava UP-TO-DATE
:compileRetrolambdaMain UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileAndroidJava UP-TO-DATE
:compileRetrolambdaAndroid SKIPPED
:compileTestJava UP-TO-DATE
:compileRetrolambdaTest SKIPPED
:compileRetrolambda UP-TO-DATE
:mergeClassesIntoJar
:validateManifest
:collectMultiDexComponents
:shrinkMultiDexComponents
:createMainDexList
[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
Total time: 4 mins 29.297 secs
这是我的软件配置:
Windows XP
作为操作系统(32 位)导致该错误的原因可能是什么?
这是 build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
}
mainClassName = 'com.gluon.GlounMainApp'
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
}
}
这是堆栈跟踪:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task':dex'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:58)
Caused by: org.gradle.api.GradleException:
at org.javafxports.jfxmobile.plugin.android.task.Dex.dex(Dex.groovy:45)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
这是 --debug 输出:
Finished executing task ':dex'
11:36:09.171 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :dex FAILED
11:36:09.187 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :dex (Thread[main,5,main]) completed. Took 0.391 secs.
11:36:09.203 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 1 mins 18.97 secs, idle: 0.421secs 11:36:09.265 [ERROR] [org.gradle.BuildExceptionReporter]
11:36:09.265 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:36:09.281 [ERROR] [org.gradle.BuildExceptionReporter]
11:36:09.296 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:36:09.312 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':dex'.
11:36:09.312 [ERROR] [org.gradle.BuildExceptionReporter] > org.gradle.api.Gradle
Exception (no error message)
11:36:09.328 [ERROR] [org.gradle.BuildExceptionReporter]
11:36:09.343 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
11:36:09.343 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
11:36:09.359 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:36:09.375 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
11:36:09.390 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:36:09.390 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 2 mins 13.48
4 secs
11:36:09.406 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager ]
Stopping 0 compiler daemon(s).
11:36:09.421 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager ]
Stopped 0 compiler daemon(s).
11:36:09.421 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file 'C:\HelloGluon\build.gradle' (C:\gradle\caches\2.2.1\scripts\build_80spgxfpvahlvz1v3mywr9rd1\ProjectScript\buil
dscript).
11:36:09.437 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file 'C:\HelloGluon\build.gradle'
(C:\gradle\caches\2.2.1\scripts\build_80spgxfpvahlvz1v3mywr9rd1\ProjectScript\no_buildscript).
11:36:09.453 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache fileHashes.bin (C:\HelloGluon\.gradle\2.2.1\taskArtifacts\fileHashe
s.bin)
11:36:09.453 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache fileSnapshots.bin (C:\HelloGluon\.gradle\2.2.1\taskArtifacts\fileSn
apshots.bin)
11:36:09.468 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache taskArtifacts.bin (C:\HelloGluon\.gradle\2.2.1\taskArtifacts\taskArtifacts.bin)
11:36:09.484 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache outputFileStates.bin (C:\HelloGluon\.gradle\2.2.1\taskArtifacts\outputFileStates.bin)
11:36:09.484 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (C:\HelloGluon\.gradle\2.2.1\taskArtifacts).
11:36:09.500 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin
Resolution Cache (C:\gradle\caches\2.2.1\plugin-resolution) was closed 0 times.
11:36:09.500 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache artifact-at-repository.bin (C:\gradle\caches\modules-2\metadata-2.14\artifact-at-repository.bin)
11:36:09.515 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache ]
Closing cache module-metadata.bin (C:\gradle\caches\modules-2\metadata-2.14\module-metadata.bin)
11:36:09.531 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\gradle\caches\modules-2).
11:36:09.531 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory ]
In-memory dependency metadata cache closed. Repos cached: 4, cache instances: 1,modules served from cache: 0, artifacts: 0
11:36:09.546 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine. store.CachedStoreFactory ]
Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
11:36:09.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory ]
Resolved configuration cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
11:36:09.562 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory ]
Deleted 2 resolution results binary files in 0.016 secs
最佳答案
我遇到了同样的问题,现在已经解决了。现在我可以编译并制作我的 android apk。
所以这些是我遵循的步骤
H:\sdk\extras\android\support\multidex files
像这样
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
}
mainClassName = 'com.fff.Fff'
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
androidSdk='H:/ADT BUNDLE/sdk'
}
}
如果您在 32 位 PC 上工作
Set environment variable name JAVA_OPTIONS with value Xmx1024M
如果您在 64 位 PC 上工作
make sure you install JDK that is 64 bit and not 32 bit JDK
关于java - 运行默认 Gluon 项目后出错(: dex FAILED),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30473854/
我有一个自定义的ListCell实现,如下图所示。 左边,代表日期,由3个标签组成,放入一个VBox和由计数器组成的“CounterContent”,每个标签有一个TextField数字,包含在一个
我是 Gluon 领域的新手,但我知道如何创建基于 JDK-8 的 JavaFX 应用程序,其中嵌入了 JavaFX 库。 看来Gluon应用程序可以在 JVM 上轻松执行,但要创建 native 镜
我想使用 PositionService iOS 上的 Gluon Mobile。我编写了一个在桌面上运行的小型示例应用程序,提供(按预期)虚假的位置更改,并在 Android 上运行。但是,在 iO
我正在尝试通过将特定于平台/操作系统的代码放在它们各自的文件夹中来设置我的 Gluon 项目(在新创建的 Gluon 项目中设置的自动创建的项目)。但是,无论我使用 Gradle 执行什么任务,它最终
我使用带有 OS X El Capitan 和 Eclipse IDE 的 mac 当我创建项目“Gluon Mobile - Single View Project”时,我无法针对 Android
只是一个简单的问题。我制作了一个 JavaFX 应用程序,我想让它在 Android 上运行。到目前为止,我发现实现此功能的唯一方法是使用 Gluon Mobile (JavaFXPorts)。但是,
我正在使用 Gluon 并有一个音频播放器。当我调用音频并播放时,一切正常,直到我按下主页按钮。我想让它做的是停止音乐,不再像现在这样继续播放。目前我已经尝试使用事件监听器来捕获事件并停止音乐但它没有
嗨,我一直在尝试对我的 javafx 项目进行 native 构建,但当我尝试运行它时出现异常。我怀疑在编译的二进制文件中找不到 .fxml 文件 Exception in thread "main"
我有一个在 Android 中运行的消息应用程序,其设置类似于 setup of the screen 顺序如下 //issue is here
我正在使用GluonMobile开发一个Android应用程序。对于一项功能,我需要一个ExoPlayer。 因此,我包括了com.google.android.exoplayer:exoplayer
我一直在关注有关该主题的各种问题的各种答案,并且得出了一个结果和一些看起来可行的代码。我被它的 NSURL 部分卡住了。我的 iOS gluon 项目的 assets 文件夹中有 2 个 mp3 轨道
我计划获取手机的 IMEI,以便在我的应用程序中生成二维码或条形码。我在提问之前已经检查过问题。此外,我还查看了 gluon mobile 文档以获取更多详细信息。但它似乎没有解决我的问题。 ispr
我是一名学生,目前正在学习并致力于使用 JavaFX(gluon 移动应用程序)开发移动应用程序。我能够构建独特的应用程序。但是,我想知道是否有任何可能的方法可以在 gluon 移动应用程序中打开网页
我的自定义 jar 文件应该添加到我的 Gluon 项目的类路径中,但我在 Netbeans 中找不到任何允许您添加自定义 jar 的工具。有人可以指导我如何做吗? 构建.gradle buildsc
假设您要使用用 Gluon JavaFX 制作的应用程序打开图片或文件。是否有任何文件导航窗口可用于选择该文件或图片? 假设我们知道我们的localRoot =/root File localRoot
我正在尝试使用 JDBC 编写一个简单的 mysql 连接代码到我在 OSX 上的 LAN 上的 mysql 服务器。 我有,– IntelliJ 15 CE– 安装了 Gluon 插件 1.0.1。
我想将一个字符串从 TextArea 保存到设备,然后在重新打开应用程序后重新加载它。我尝试按照示例 ( link ) 进行操作,但无法正常工作。当我尝试读取文件并使用 StringInputConv
我想生成必须将 Logo 放在中心的 QR CODE。我检查了 zxing 库,并通过阅读这段代码 ( How to generate QR code with logo inside it? ) 使
您好,我正在使用应用程序加载器将我的应用程序加载到 TestFlight 中,但我不断收到 3 个错误,我不知道如何处理它们。 Error ITMS-90096 Your binary is not
我有一个自定义控件 ChoiceTextField,具有相应的 ChoiceTextFieldSkin。 protected Skin createDefaultSkin() { re
我是一名优秀的程序员,十分优秀!