使用外部JAR构建时出现Android desugar错误

时间:2018-03-27 19:38:19

标签: android-studio android-gradle hyperledger-fabric

我尝试用jar依赖编译android项目。

我收到以下错误:



org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDesugarForDebug'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
	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:626)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
	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:745)
Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/13.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/3.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/15.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/1.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/11.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/classes/debug --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/android.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/resources.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/rt.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jsse.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jce.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/charsets.jar --min_sdk_version 2 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes --legacy_jacoco_fix}
	at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
	at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
	at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
	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.IncrementalTaskAction.doExecute(IncrementalTaskAction.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.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
	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:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
	... 32 more
Caused by: com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/13.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/3.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/15.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/1.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/11.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/classes/debug --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/android.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/resources.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/rt.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jsse.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jce.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/charsets.jar --min_sdk_version 2 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes --legacy_jacoco_fix}
	at com.android.build.gradle.internal.transforms.DesugarTransform.transform(DesugarTransform.java:292)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
	... 47 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/13.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/3.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/15.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/1.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/11.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/classes/debug --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/android.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/resources.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/rt.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jsse.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jce.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/charsets.jar --min_sdk_version 2 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes --legacy_jacoco_fix}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
	at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
	at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146)
	at com.android.build.gradle.internal.transforms.DesugarTransform.processNonCachedOnes(DesugarTransform.java:466)
	at com.android.build.gradle.internal.transforms.DesugarTransform.transform(DesugarTransform.java:277)
	... 50 more
Caused by: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/13.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/3.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/15.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/1.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/11.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/classes/debug --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/android.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/resources.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/rt.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jsse.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jce.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/charsets.jar --min_sdk_version 2 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes --legacy_jacoco_fix}
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/13.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/3.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/15.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/1.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/11.jar --input /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --output /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/desugar/debug/6.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/classes/debug --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /home/tal/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms
(.... I removed it because text limit ....)
/AndroidStudioProjects/TestApp2/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/android.jar --bootclasspath_entry /home/tal/Android/Sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/resources.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/rt.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jsse.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/jce.jar --bootclasspath_entry /home/tal/src/android-studio/jre/jre/lib/charsets.jar --min_sdk_version 2 --desugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes --legacy_jacoco_fix}
	at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:73)
	at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:48)
	at com.android.build.gradle.internal.transforms.DesugarTransform.lambda$processNonCachedOnes$3(DesugarTransform.java:462)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	... 4 more
Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/tal/src/android-studio/jre/bin/java'' finished with non-zero exit value 1
	at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:382)
	at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:46)
	... 6 more




这个JAR是JAR-with-dependencies(即在JAR中也包含它的dep。)。

为什么会这样?我之前阅读过帖子,它只是说" copy-paste"代码到一个新项目,但是当我测试它时它不起作用。

事实上,即使我只是尝试使用此JAR构建一个空活动示例,它也会失败。

这个JAR是使用maven(使用dep。)为项目fabric-sdk-java(HyperLedger-Fabric)编译的。

有什么想法吗?

0 个答案:

没有答案