Unity在安卓Build时报错解决:CommandInvokationFailure和编译器 (1.8.0-adoptopenjdk) 中出现异常错误

本文主要是介绍Unity在安卓Build时报错解决:CommandInvokationFailure和编译器 (1.8.0-adoptopenjdk) 中出现异常错误,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Unity在安卓Build时报错解决:CommandInvokationFailure和编译器(1.8.0-adoptopenjdk)中出现异常错误

    • 错误描述
    • 解决方案

错误描述

这个我是发现一系列的错误都在于这个Build问题,这里都列举一下:

  1. CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
    C:/Users/20180321/AppData/Local/Android/android-sdk\platform-tools\adb.exe -s “PA7310PGB8151137G” install -r “C:\Users\20180321\Desktop\pico01\39.apk”

    • > Configure project :launcher
      WARNING: The option ‘android.enableR8’ is deprecated and should not be used anymore.
      It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8.

    • 编译器 (1.8.0-adoptopenjdk) 中出现异常错误。如果在 Bug Database (http://bugs.java.com) 中没有找到该错误, 请通过 Java Bug 报告页 (http://bugreport.java.com) 建立该 Java 编译器 Bug。请在报告中附上您的程序和以下诊断信息。谢谢。
      java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable N a m e I m p l ) a t c o m . s u n . t o o l s . j a v a c . u t i l . A s s e r t . e r r o r ( A s s e r t . j a v a : 133 ) a t c o m . s u n . t o o l s . j a v a c . c o d e . T y p e A n n o t a t i o n s . a n n o t a t i o n T y p e ( T y p e A n n o t a t i o n s . j a v a : 231 ) a t c o m . s u n . t o o l s . j a v a c . c o d e . T y p e A n n o t a t i o n s NameImpl) at com.sun.tools.javac.util.Assert.error(Assert.java:133) at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231) at com.sun.tools.javac.code.TypeAnnotations NameImpl)atcom.sun.tools.javac.util.Assert.error(Assert.java:133)atcom.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231)atcom.sun.tools.javac.code.TypeAnnotationsTypeAnnotationPositions.separateAnnotationsKinds(TypeAnnotations.java:294)
      at com.sun.tools.javac.code.TypeAnnotations T y p e A n n o t a t i o n P o s i t i o n s . v i s i t V a r D e f ( T y p e A n n o t a t i o n s . j a v a : 1164 ) a t c o m . s u n . t o o l s . j a v a c . t r e e . J C T r e e TypeAnnotationPositions.visitVarDef(TypeAnnotations.java:1164) at com.sun.tools.javac.tree.JCTree TypeAnnotationPositions.visitVarDef(TypeAnnotations.java:1164)atcom.sun.tools.javac.tree.JCTreeJCVariableDecl.accept(JCTree.java:852)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.code.TypeAnnotations T y p e A n n o t a t i o n P o s i t i o n s . s c a n ( T y p e A n n o t a t i o n s . j a v a : 275 ) a t c o m . s u n . t o o l s . j a v a c . t r e e . T r e e S c a n n e r . s c a n ( T r e e S c a n n e r . j a v a : 57 ) a t c o m . s u n . t o o l s . j a v a c . c o d e . T y p e A n n o t a t i o n s TypeAnnotationPositions.scan(TypeAnnotations.java:275) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57) at com.sun.tools.javac.code.TypeAnnotations TypeAnnotationPositions.scan(TypeAnnotations.java:275)atcom.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)atcom.sun.tools.javac.code.TypeAnnotationsTypeAnnotationPositions.visitClassDef(TypeAnnotations.java:1042)
      at com.sun.tools.javac.tree.JCTree J C C l a s s D e c l . a c c e p t ( J C T r e e . j a v a : 693 ) a t c o m . s u n . t o o l s . j a v a c . t r e e . T r e e S c a n n e r . s c a n ( T r e e S c a n n e r . j a v a : 49 ) a t c o m . s u n . t o o l s . j a v a c . c o d e . T y p e A n n o t a t i o n s JCClassDecl.accept(JCTree.java:693) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.code.TypeAnnotations JCClassDecl.accept(JCTree.java:693)atcom.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)atcom.sun.tools.javac.code.TypeAnnotationsTypeAnnotationPositions.scan(TypeAnnotations.java:275)
      at com.sun.tools.javac.code.TypeAnnotations$1.run(TypeAnnotations.java:127)
      at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:152)
      at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
      at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
      at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
      at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
      at com.sun.tools.javac.main.Main.compile(Main.java:523)
      at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:93)
      at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
      at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:54)
      at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:39)
      at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:100)
      at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
      at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
      at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:51)
      at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:37)
      at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:39)
      at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory$2.execute(IncrementalCompilerFactory.java:101)
      at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory$2.execute(IncrementalCompilerFactory.java:97)
      at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:60)
      at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:44)
      at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:59)
      at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler 2. c a l l ( C o m p i l e J a v a B u i l d O p e r a t i o n R e p o r t i n g C o m p i l e r . j a v a : 51 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r 2.call(CompileJavaBuildOperationReportingCompiler.java:51) at org.gradle.internal.operations.DefaultBuildOperationExecutor 2.call(CompileJavaBuildOperationReportingCompiler.java:51)atorg.gradle.internal.operations.DefaultBuildOperationExecutorCallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
      at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler.execute(CompileJavaBuildOperationReportingCompiler.java:51)
      at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:158)
      at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:126)
      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:103)
      at org.gradle.api.internal.project.taskfactory.IncrementalTaskInputsTaskAction.doExecute(IncrementalTaskInputsTaskAction.java:47)
      at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
      at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
      at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter 5. r u n ( E x e c u t e A c t i o n s T a s k E x e c u t e r . j a v a : 476 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r 5.run(ExecuteActionsTaskExecuter.java:476) at org.gradle.internal.operations.DefaultBuildOperationExecutor 5.run(ExecuteActionsTaskExecuter.java:476)atorg.gradle.internal.operations.DefaultBuildOperationExecutorRunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:461)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:444)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access 200 ( E x e c u t e A c t i o n s T a s k E x e c u t e r . j a v a : 93 ) a t o r g . g r a d l e . a p i . i n t e r n a l . t a s k s . e x e c u t i o n . E x e c u t e A c t i o n s T a s k E x e c u t e r 200(ExecuteActionsTaskExecuter.java:93) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter 200(ExecuteActionsTaskExecuter.java:93)atorg.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuterTaskExecution.execute(ExecuteActionsTaskExecuter.java:237)
      at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute 0 ( E x e c u t e S t e p . j a v a : 32 ) a t j a v a . u t i l . O p t i o n a l . m a p ( O p t i o n a l . j a v a : 215 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . E x e c u t e S t e p . e x e c u t e ( E x e c u t e S t e p . j a v a : 32 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . E x e c u t e S t e p . e x e c u t e ( E x e c u t e S t e p . j a v a : 26 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C l e a n u p O u t p u t s S t e p . e x e c u t e ( C l e a n u p O u t p u t s S t e p . j a v a : 58 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C l e a n u p O u t p u t s S t e p . e x e c u t e ( C l e a n u p O u t p u t s S t e p . j a v a : 35 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . R e s o l v e I n p u t C h a n g e s S t e p . e x e c u t e ( R e s o l v e I n p u t C h a n g e s S t e p . j a v a : 48 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . R e s o l v e I n p u t C h a n g e s S t e p . e x e c u t e ( R e s o l v e I n p u t C h a n g e s S t e p . j a v a : 33 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C a n c e l E x e c u t i o n S t e p . e x e c u t e ( C a n c e l E x e c u t i o n S t e p . j a v a : 39 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . T i m e o u t S t e p . e x e c u t e W i t h o u t T i m e o u t ( T i m e o u t S t e p . j a v a : 73 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . T i m e o u t S t e p . e x e c u t e ( T i m e o u t S t e p . j a v a : 54 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C a t c h E x c e p t i o n S t e p . e x e c u t e ( C a t c h E x c e p t i o n S t e p . j a v a : 35 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C r e a t e O u t p u t s S t e p . e x e c u t e ( C r e a t e O u t p u t s S t e p . j a v a : 51 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S n a p s h o t O u t p u t s S t e p . e x e c u t e ( S n a p s h o t O u t p u t s S t e p . j a v a : 45 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S n a p s h o t O u t p u t s S t e p . e x e c u t e ( S n a p s h o t O u t p u t s S t e p . j a v a : 31 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C a c h e S t e p . e x e c u t e W i t h o u t C a c h e ( C a c h e S t e p . j a v a : 208 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C a c h e S t e p . e x e c u t e ( C a c h e S t e p . j a v a : 70 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . C a c h e S t e p . e x e c u t e ( C a c h e S t e p . j a v a : 45 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . B r o a d c a s t C h a n g i n g O u t p u t s S t e p . e x e c u t e ( B r o a d c a s t C h a n g i n g O u t p u t s S t e p . j a v a : 49 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S t o r e S n a p s h o t s S t e p . e x e c u t e ( S t o r e S n a p s h o t s S t e p . j a v a : 43 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S t o r e S n a p s h o t s S t e p . e x e c u t e ( S t o r e S n a p s h o t s S t e p . j a v a : 32 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . R e c o r d O u t p u t s S t e p . e x e c u t e ( R e c o r d O u t p u t s S t e p . j a v a : 38 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . R e c o r d O u t p u t s S t e p . e x e c u t e ( R e c o r d O u t p u t s S t e p . j a v a : 24 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S k i p U p T o D a t e S t e p . e x e c u t e B e c a u s e ( S k i p U p T o D a t e S t e p . j a v a : 96 ) a t o r g . g r a d l e . i n t e r n a l . e x e c u t i o n . s t e p s . S k i p U p T o D a t e S t e p . l a m b d a 0(ExecuteStep.java:32) at java.util.Optional.map(Optional.java:215) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:32) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31) at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43) at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda 0(ExecuteStep.java:32)atjava.util.Optional.map(Optional.java:215)atorg.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:32)atorg.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)atorg.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58)atorg.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)atorg.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)atorg.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33)atorg.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39)atorg.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)atorg.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)atorg.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35)atorg.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)atorg.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)atorg.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)atorg.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208)atorg.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)atorg.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)atorg.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)atorg.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)atorg.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)atorg.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)atorg.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)atorg.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)atorg.gradle.internal.execution.steps.SkipUpToDateStep.lambdaexecute$0(SkipUpToDateStep.java:89)
      at java.util.Optional.map(Optional.java:215)
      at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
      at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
      at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
      at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
      at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
      at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
      at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
      at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
      at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:69)
      at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:47)
      at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:140)
      at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
      at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
      at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
      at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
      at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
      at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
      at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
      at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
      at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
      at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter 1. c a l l ( E v e n t F i r i n g T a s k E x e c u t e r . j a v a : 52 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r 1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationExecutor 1.call(EventFiringTaskExecuter.java:52)atorg.gradle.internal.operations.DefaultBuildOperationExecutorCallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor 1. e x e c u t e ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 165 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . e x e c u t e ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 250 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . e x e c u t e ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 158 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . c a l l ( D e f a u l t B u i l d O p e r a t i o n E x e c u t o r . j a v a : 102 ) a t o r g . g r a d l e . i n t e r n a l . o p e r a t i o n s . D e l e g a t i n g B u i l d O p e r a t i o n E x e c u t o r . c a l l ( D e l e g a t i n g B u i l d O p e r a t i o n E x e c u t o r . j a v a : 36 ) a t o r g . g r a d l e . a p i . i n t e r n a l . t a s k s . e x e c u t i o n . E v e n t F i r i n g T a s k E x e c u t e r . e x e c u t e ( E v e n t F i r i n g T a s k E x e c u t e r . j a v a : 52 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . L o c a l T a s k N o d e E x e c u t o r . e x e c u t e ( L o c a l T a s k N o d e E x e c u t o r . j a v a : 43 ) a t o r g . g r a d l e . e x e c u t i o n . t a s k g r a p h . D e f a u l t T a s k E x e c u t i o n G r a p h 1.execute(DefaultBuildOperationExecutor.java:165) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph 1.execute(DefaultBuildOperationExecutor.java:165)atorg.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)atorg.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)atorg.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)atorg.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)atorg.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)atorg.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)atorg.gradle.execution.taskgraph.DefaultTaskExecutionGraphInvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph I n v o k e N o d e E x e c u t o r s A c t i o n . e x e c u t e ( D e f a u l t T a s k E x e c u t i o n G r a p h . j a v a : 343 ) a t o r g . g r a d l e . e x e c u t i o n . t a s k g r a p h . D e f a u l t T a s k E x e c u t i o n G r a p h InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)atorg.gradle.execution.taskgraph.DefaultTaskExecutionGraphBuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph B u i l d O p e r a t i o n A w a r e E x e c u t i o n A c t i o n . e x e c u t e ( D e f a u l t T a s k E x e c u t i o n G r a p h . j a v a : 322 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322) at org.gradle.execution.plan.DefaultPlanExecutor BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker 1. e x e c u t e ( D e f a u l t P l a n E x e c u t o r . j a v a : 134 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r 1.execute(DefaultPlanExecutor.java:134) at org.gradle.execution.plan.DefaultPlanExecutor 1.execute(DefaultPlanExecutor.java:134)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker 1. e x e c u t e ( D e f a u l t P l a n E x e c u t o r . j a v a : 129 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r 1.execute(DefaultPlanExecutor.java:129) at org.gradle.execution.plan.DefaultPlanExecutor 1.execute(DefaultPlanExecutor.java:129)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker.execute(DefaultPlanExecutor.java:202)
      at org.gradle.execution.plan.DefaultPlanExecutor E x e c u t o r W o r k e r . e x e c u t e N e x t N o d e ( D e f a u l t P l a n E x e c u t o r . j a v a : 193 ) a t o r g . g r a d l e . e x e c u t i o n . p l a n . D e f a u l t P l a n E x e c u t o r ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193) at org.gradle.execution.plan.DefaultPlanExecutor ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)atorg.gradle.execution.plan.DefaultPlanExecutorExecutorWorker.run(DefaultPlanExecutor.java:129)
      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
      at org.gradle.internal.concurrent.ManagedExecutorImpl 1. r u n ( M a n a g e d E x e c u t o r I m p l . j a v a : 48 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1149 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r 1.run(ManagedExecutorImpl.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor 1.run(ManagedExecutorImpl.java:48)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
      at java.lang.Thread.run(Thread.java:748)
      FAILURE: Build failed with an exception.
      *What went wrong:
      Execution failed for task ‘:unityLibrary:compileDebugJavaWithJavac’.
      >Compilation failed; see the compiler error output for details.
      *Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      *Get more help at https://help.gradle.org
      BUILD FAILED in 4s
      Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
      UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

解决方案

在网上查找的解决方案,原文链接如下:https://www.jianshu.com/p/e0f97d6933a5。
里面有3个方案,里面我用的第一个就可以了,其他的没有测,这里转载一下。

  1. 方案一
    把Target API Level设置成30,这样31,32的也能自动适配过去的。
    截图
  2. 方案二
    都是说换JDK,但是我(原文作者)的换了JDK也还是不行,后来是先直接删除掉全部的JDK然后再重装装一次就行了。
    如果还不可以的话,可以试试装一下JDK的11版本的。
  3. 方案三
    还有一种可能是你项目里面接了Firebase插件,你需要在unity里面卸载掉它们再重装就能修复这个问题。
    截图引用
    截图引用
    然后再导入就可以了,我有次是这样解决掉的问题的,希望你的也能得到处理。

这篇关于Unity在安卓Build时报错解决:CommandInvokationFailure和编译器 (1.8.0-adoptopenjdk) 中出现异常错误的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/442161

相关文章

IDEA和GIT关于文件中LF和CRLF问题及解决

《IDEA和GIT关于文件中LF和CRLF问题及解决》文章总结:因IDEA默认使用CRLF换行符导致Shell脚本在Linux运行报错,需在编辑器和Git中统一为LF,通过调整Git的core.aut... 目录问题描述问题思考解决过程总结问题描述项目软件安装shell脚本上git仓库管理,但拉取后,上l

解决docker目录内存不足扩容处理方案

《解决docker目录内存不足扩容处理方案》文章介绍了Docker存储目录迁移方法:因系统盘空间不足,需将Docker数据迁移到更大磁盘(如/home/docker),通过修改daemon.json配... 目录1、查看服务器所有磁盘的使用情况2、查看docker镜像和容器存储目录的空间大小3、停止dock

idea npm install很慢问题及解决(nodejs)

《ideanpminstall很慢问题及解决(nodejs)》npm安装速度慢可通过配置国内镜像源(如淘宝)、清理缓存及切换工具解决,建议设置全局镜像(npmconfigsetregistryht... 目录idea npm install很慢(nodejs)配置国内镜像源清理缓存总结idea npm in

idea突然报错Malformed \uxxxx encoding问题及解决

《idea突然报错Malformeduxxxxencoding问题及解决》Maven项目在切换Git分支时报错,提示project元素为描述符根元素,解决方法:删除Maven仓库中的resolv... 目www.chinasem.cn录问题解决方式总结问题idea 上的 maven China编程项目突然报错,是

在Ubuntu上打不开GitHub的完整解决方法

《在Ubuntu上打不开GitHub的完整解决方法》当你满心欢喜打开Ubuntu准备推送代码时,突然发现终端里的gitpush卡成狗,浏览器里的GitHub页面直接变成Whoathere!警告页面... 目录一、那些年我们遇到的"红色惊叹号"二、三大症状快速诊断症状1:浏览器直接无法访问症状2:终端操作异常

mybatis直接执行完整sql及踩坑解决

《mybatis直接执行完整sql及踩坑解决》MyBatis可通过select标签执行动态SQL,DQL用ListLinkedHashMap接收结果,DML用int处理,注意防御SQL注入,优先使用#... 目录myBATiFBNZQs直接执行完整sql及踩坑select语句采用count、insert、u

MyBatis Plus大数据量查询慢原因分析及解决

《MyBatisPlus大数据量查询慢原因分析及解决》大数据量查询慢常因全表扫描、分页不当、索引缺失、内存占用高及ORM开销,优化措施包括分页查询、流式读取、SQL优化、批处理、多数据源、结果集二次... 目录大数据量查询慢的常见原因优化方案高级方案配置调优监控与诊断总结大数据量查询慢的常见原因MyBAT

MyBatis/MyBatis-Plus同事务循环调用存储过程获取主键重复问题分析及解决

《MyBatis/MyBatis-Plus同事务循环调用存储过程获取主键重复问题分析及解决》MyBatis默认开启一级缓存,同一事务中循环调用查询方法时会重复使用缓存数据,导致获取的序列主键值均为1,... 目录问题原因解决办法如果是存储过程总结问题myBATis有如下代码获取序列作为主键IdMappe

Java中字符编码问题的解决方法详解

《Java中字符编码问题的解决方法详解》在日常Java开发中,字符编码问题是一个非常常见却又特别容易踩坑的地方,这篇文章就带你一步一步看清楚字符编码的来龙去脉,并结合可运行的代码,看看如何在Java项... 目录前言背景:为什么会出现编码问题常见场景分析控制台输出乱码文件读写乱码数据库存取乱码解决方案统一使

C++右移运算符的一个小坑及解决

《C++右移运算符的一个小坑及解决》文章指出右移运算符处理负数时左侧补1导致死循环,与除法行为不同,强调需注意补码机制以正确统计二进制1的个数... 目录我遇到了这么一个www.chinasem.cn函数由此可以看到也很好理解总结我遇到了这么一个函数template<typename T>unsigned