Gluon Mobile androidinstall applyRetrolambda ошибка
При запуске на рабочем столе все зеленый свет - ок. Но при запуске andininstall возникает ошибка в процессе applyRetrolambda. Сообщение об ошибке ниже:
org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:389)
at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:36)
at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:183)
at org.gradle.api.internal.project.DefaultProject.javaexec(DefaultProject.java:1077)
at org.gradle.api.internal.project.DefaultProject.javaexec(DefaultProject.java:1072)
at org.javafxports.jfxmobile.plugin.RetrolambdaExec.exec(RetrolambdaExec.groovy:38)
at org.javafxports.jfxmobile.plugin.RetrolambdaExec$exec.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.javafxports.jfxmobile.plugin.android.task.Retrolambda.retrolambda(Retrolambda.groovy:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:788)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:755)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:623)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:578)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Я пытаюсь создать еще один новый мобильный проект Gluon, затем запустите androidinstall и передайте правильное приложение.
Пожалуйста, помогите мне!
Добавьте build.gradle ниже:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter{
url 'http://jcenter.bintray.com'
}
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.ck.app.AppMain'
dependencies {
compile 'com.gluonhq:charm:4.4.1'
compile 'com.gluonhq:glisten-afterburner:1.2.0'
compile group: 'org.glassfish.jersey.bundles', name: 'jaxrs-ri', version: '2.26'
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.26'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: '2.26'
compile group: 'org.jvnet.mimepull', name: 'mimepull', version: '1.9.7'
compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.4'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.4'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.4'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.9.4'
compile group: 'com.j256.ormlite', name: 'ormlite-core', version: '5.0'
compile group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '5.0'
compile "commons-lang:commons-lang:2.6"
compile "io.jsonwebtoken:jjwt:0.9.0"
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.20'
// Desktop SQL -> https://github.com/xerial/sqlite-jdbc
//desktopRuntime 'org.xerial:sqlite-jdbc:3.8.11.2'
desktopRuntime 'org.xerial:sqlite-jdbc:3.8.11.2'
// Embedded SQL -> https://github.com/xerial/sqlite-jdbc
embeddedRuntime 'org.xerial:sqlite-jdbc:3.7.2'
// Android SQL -> https://github.com/SQLDroid/SQLDroid
androidRuntime 'org.sqldroid:sqldroid:1.0.3'
// ios SQL -> https://github.com/robovm/robovm 1.8
}
jfxmobile {
downConfig {
version = '3.7.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'cache', 'display', 'lifecycle', 'pictures', 'settings', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*',
'SQLite.**.*'
]
}
}
Может быть, некоторые зависимости несовместимы.:)
Запустите./gradlew --info androidInstall ниже:
> Task :applyRetrolambda
Task ':applyRetrolambda' is not up-to-date because:
Task has failed previously.
Starting process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe''. Working directory: D:\WS\WS_Gluon\Gluon-mobile Command: C:\Program Files\Java\jdk1.8.0_131\bin\java.exe -Dretrolambda.bytecodeVersion=50 -Dretrolambda.classpath=D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\input;D:\Android\sdk\platforms\android-21\android.jar -Dretrolambda.defaultMethods=true -Dretrolambda.inputDir=D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\input -Dretrolambda.outputDir=D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\output -Dfile.encoding=x-windows-950 -Duser.country=TW -Duser.language=zh -Duser.variant -cp D:\Programs\repositories\Gradle\caches\modules-2\files-2.1\net.orfjackal.retrolambda\retrolambda\2.5.1\3db6629d3ba0168c580af3be44fe54014dfb105\retrolambda-2.5.1.jar net.orfjackal.retrolambda.Main
Successfully started process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe''
Retrolambda 2.5.1
00:00 INFO: Bytecode version: 50 (Java 6)
00:00 INFO: Default methods: true
00:00 INFO: Input directory: D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\input
00:00 INFO: Output directory: D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\output
00:00 INFO: Classpath: [D:\WS\WS_Gluon\Gluon-mobile\build\javafxports\tmp\android\retrolambda\input, D:\Android\sdk\platforms\android-21\android.jar]
00:00 INFO: Included files: all
00:00 INFO: Agent enabled: false
00:02 ERROR: Failed to run Retrolambda
java.lang.IllegalArgumentException
at net.orfjackal.retrolambda.asm.ClassReader.<init>(ClassReader.java:185)
at net.orfjackal.retrolambda.asm.ClassReader.<init>(ClassReader.java:168)
at net.orfjackal.retrolambda.ClassAnalyzer.analyze(ClassAnalyzer.java:25)
at net.orfjackal.retrolambda.Retrolambda$1.visitClass(Retrolambda.java:62)
at net.orfjackal.retrolambda.files.ClasspathVisitor.visitFile(ClasspathVisitor.java:29)
at net.orfjackal.retrolambda.files.ClasspathVisitor.visitFile(ClasspathVisitor.java:11)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at net.orfjackal.retrolambda.Retrolambda.visitFiles(Retrolambda.java:98)
at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:59)
at net.orfjackal.retrolambda.Main.main(Main.java:28)
:applyRetrolambda (Thread[Task worker for ':',5,main]) completed. Took 3.495 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':applyRetrolambda'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe'' finished with non-zero exit value 1
1 ответ
Исключение в действительности не говорит о том, какая из зависимостей дает сбой при применении плагина retrolambda для обратного переноса байт-кода в Java 6/7.
Поэтому я прокомментировал некоторые из них, пока не обнаружил, что они терпят неудачу.
Оказалось, что это были те, которые терпят неудачу:
compile group: 'org.glassfish.jersey.bundles', name: 'jaxrs-ri', version: '2.26'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.26'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: '2.26'
Используя более низкую версию, процесс retrolambda прошел хорошо, и я обнаружил, что до последней версии до 2.26 он работает нормально:
compile group: 'org.glassfish.jersey.bundles', name: 'jaxrs-ri', version: '2.25.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.25.1'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-multipart', version: '2.25.1'
Вы можете перейти по ссылке на заметки о выпуске в Джерси и узнать о больших изменениях, внесенных в 2.26 благодаря совместимости с Java EE 8.
Во-вторых, задача Android не будет работать полностью, так как есть дубликаты файлов. Использовать packagingOptions
чтобы исключить, как в этом ответе.