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

相关文章

安卓链接正常显示,ios#符被转义%23导致链接访问404

原因分析: url中含有特殊字符 中文未编码 都有可能导致URL转换失败,所以需要对url编码处理  如下: guard let allowUrl = webUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {return} 后面发现当url中有#号时,会被误伤转义为%23,导致链接无法访问

如何解决线上平台抽佣高 线下门店客流少的痛点!

目前,许多传统零售店铺正遭遇客源下降的难题。尽管广告推广能带来一定的客流,但其费用昂贵。鉴于此,众多零售商纷纷选择加入像美团、饿了么和抖音这样的大型在线平台,但这些平台的高佣金率导致了利润的大幅缩水。在这样的市场环境下,商家之间的合作网络逐渐成为一种有效的解决方案,通过资源和客户基础的共享,实现共同的利益增长。 以最近在上海兴起的一个跨行业合作平台为例,该平台融合了环保消费积分系统,在短

MCU7.keil中build产生的hex文件解读

1.hex文件大致解读 闲来无事,查看了MCU6.用keil新建项目的hex文件 用FlexHex打开 给我的第一印象是:经过软件的解释之后,发现这些数据排列地十分整齐 :02000F0080FE71:03000000020003F8:0C000300787FE4F6D8FD75810702000F3D:00000001FF 把解释后的数据当作十六进制来观察 1.每一行数据

pip-tools:打造可重复、可控的 Python 开发环境,解决依赖关系,让代码更稳定

在 Python 开发中,管理依赖关系是一项繁琐且容易出错的任务。手动更新依赖版本、处理冲突、确保一致性等等,都可能让开发者感到头疼。而 pip-tools 为开发者提供了一套稳定可靠的解决方案。 什么是 pip-tools? pip-tools 是一组命令行工具,旨在简化 Python 依赖关系的管理,确保项目环境的稳定性和可重复性。它主要包含两个核心工具:pip-compile 和 pip

【VUE】跨域问题的概念,以及解决方法。

目录 1.跨域概念 2.解决方法 2.1 配置网络请求代理 2.2 使用@CrossOrigin 注解 2.3 通过配置文件实现跨域 2.4 添加 CorsWebFilter 来解决跨域问题 1.跨域概念 跨域问题是由于浏览器实施了同源策略,该策略要求请求的域名、协议和端口必须与提供资源的服务相同。如果不相同,则需要服务器显式地允许这种跨域请求。一般在springbo

速盾高防cdn是怎么解决网站攻击的?

速盾高防CDN是一种基于云计算技术的网络安全解决方案,可以有效地保护网站免受各种网络攻击的威胁。它通过在全球多个节点部署服务器,将网站内容缓存到这些服务器上,并通过智能路由技术将用户的请求引导到最近的服务器上,以提供更快的访问速度和更好的网络性能。 速盾高防CDN主要采用以下几种方式来解决网站攻击: 分布式拒绝服务攻击(DDoS)防护:DDoS攻击是一种常见的网络攻击手段,攻击者通过向目标网

消除安卓SDK更新时的“https://dl-ssl.google.com refused”异常的方法

消除安卓SDK更新时的“https://dl-ssl.google.com refused”异常的方法   消除安卓SDK更新时的“https://dl-ssl.google.com refused”异常的方法 [转载]原地址:http://blog.csdn.net/x605940745/article/details/17911115 消除SDK更新时的“

Jenkins 插件 地址证书报错问题解决思路

问题提示摘要: SunCertPathBuilderException: unable to find valid certification path to requested target...... 网上很多的解决方式是更新站点的地址,我这里修改了一个日本的地址(清华镜像也好),其实发现是解决不了上述的报错问题的,其实,最终拉去插件的时候,会提示证书的问题,几经周折找到了其中一遍博文

Redis中使用布隆过滤器解决缓存穿透问题

一、缓存穿透(失效)问题 缓存穿透是指查询一个一定不存在的数据,由于缓存中没有命中,会去数据库中查询,而数据库中也没有该数据,并且每次查询都不会命中缓存,从而每次请求都直接打到了数据库上,这会给数据库带来巨大压力。 二、布隆过滤器原理 布隆过滤器(Bloom Filter)是一种空间效率很高的随机数据结构,它利用多个不同的哈希函数将一个元素映射到一个位数组中的多个位置,并将这些位置的值置

linux 下Time_wait过多问题解决

转自:http://blog.csdn.net/jaylong35/article/details/6605077 问题起因: 自己开发了一个服务器和客户端,通过短连接的方式来进行通讯,由于过于频繁的创建连接,导致系统连接数量被占用,不能及时释放。看了一下18888,当时吓到了。 现象: 1、外部机器不能正常连接SSH 2、内向外不能够正常的ping通过,域名也不能正常解析。