Why is my Gradle Failing on my Unity Android Build? - android

I used to use 'Internal' option to build my Android Version but in Unity 2019 there is no option.
When trying to build my Android version I get the following errors:
D8: Program type already present:
android.support.annotation.FractionRes
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesAndResourcesWithR8ForRelease'.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete
* 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 19s
Task :preBuild UP-TO-DATE
Task :extractProguardFiles
Task :CropLib:preBuild UP-TO-DATE
Task :CropLib:preReleaseBuild UP-TO-DATE
Task :CropLib:checkReleaseManifest
Task :CropLib:processReleaseManifest
Task :Firebase:preBuild UP-TO-DATE
Task :Firebase:preReleaseBuild UP-TO-DATE
Task :Firebase:checkReleaseManifest
Task :Firebase:processReleaseManifest
Task :preReleaseBuild
Task :CropLib:compileReleaseAidl NO-SOURCE
Task :Firebase:compileReleaseAidl NO-SOURCE
Task :compileReleaseAidl NO-SOURCE
Task :CropLib:packageReleaseRenderscript NO-SOURCE
Task :Firebase:packageReleaseRenderscript NO-SOURCE
Task :compileReleaseRenderscript NO-SOURCE
Task :checkReleaseManifest
Task :generateReleaseBuildConfig
Task :prepareLintJar
Task :generateReleaseSources
Task :CropLib:compileReleaseRenderscript NO-SOURCE
Task :CropLib:generateReleaseBuildConfig
Task :CropLib:generateReleaseResValues
Task :CropLib:generateReleaseResources
Task :CropLib:packageReleaseResources
Task :CropLib:generateReleaseRFile
Task :CropLib:prepareLintJar
Task :CropLib:generateReleaseSources
Task :CropLib:javaPreCompileRelease
Task :CropLib:compileReleaseJavaWithJavac
Task :CropLib:bundleLibCompileRelease
Task :Firebase:compileReleaseRenderscript NO-SOURCE
Task :Firebase:generateReleaseBuildConfig
Task :Firebase:generateReleaseResValues
Task :Firebase:generateReleaseResources
Task :Firebase:packageReleaseResources
Task :Firebase:generateReleaseRFile
Task :Firebase:prepareLintJar
Task :Firebase:generateReleaseSources
Task :Firebase:javaPreCompileRelease
Task :Firebase:compileReleaseJavaWithJavac
Task :Firebase:bundleLibCompileRelease
Task :javaPreCompileRelease
Task :mainApkListPersistenceRelease
Task :generateReleaseResValues
Task :generateReleaseResources
Task :mergeReleaseResources
Task :createReleaseCompatibleScreenManifests
Task :processReleaseManifest
/Users/spin/Desktop/Yellows Unity App - Android
2019/Temp/gradleOut/src/main/AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity#android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
warn: removing resource com.Yellows.Monthly:string/save without required default value.
Task :processReleaseResources
Task :compileReleaseJavaWithJavac
Task :compileReleaseSources
Task :CropLib:prepareLintJarForPublish
Task :Firebase:prepareLintJarForPublish
Task :lintVitalRelease
Task :mergeReleaseShaders
Task :compileReleaseShaders
Task :generateReleaseAssets
Task :CropLib:mergeReleaseShaders
Task :CropLib:compileReleaseShaders
Task :CropLib:generateReleaseAssets
Task :CropLib:packageReleaseAssets
Task :Firebase:mergeReleaseShaders
Task :Firebase:compileReleaseShaders
Task :Firebase:generateReleaseAssets
Task :Firebase:packageReleaseAssets
Task :mergeReleaseAssets
Task :validateSigningRelease
Task :signingConfigWriterRelease
Task :processReleaseJavaRes NO-SOURCE
Task :CropLib:processReleaseJavaRes NO-SOURCE
Task :CropLib:bundleLibResRelease
Task :Firebase:processReleaseJavaRes NO-SOURCE
Task :Firebase:bundleLibResRelease
Task :transformResourcesWithMergeJavaResForRelease
Task :CropLib:bundleLibRuntimeRelease
Task :CropLib:mergeReleaseConsumerProguardFiles
Task :Firebase:bundleLibRuntimeRelease
Task :Firebase:mergeReleaseConsumerProguardFiles
Task :transformClassesAndResourcesWithR8ForRelease FAILED
R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
55 actionable tasks: 55 executed
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2019.2.0f1/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/Hub/Editor/2019.2.0f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
D8: Program type already present: android.support.annotation.FractionRes
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':transformClassesAndResourcesWithR8ForRelease'.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete
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 19s
]
stdout[
Task :preBuild UP-TO-DATE
Task :extractProguardFiles
Task :CropLib:preBuild UP-TO-DATE
Task :CropLib:preReleaseBuild UP-TO-DATE
Task :CropLib:checkReleaseManifest
Task :CropLib:processReleaseManifest
Task :Firebase:preBuild UP-TO-DATE
Task :Firebase:preReleaseBuild UP-TO-DATE
Task :Firebase:checkReleaseManifest
Task :Firebase:processReleaseManifest
Task :preReleaseBuild
Task :CropLib:compileReleaseAidl NO-SOURCE
Task :Firebase:compileReleaseAidl NO-SOURCE
Task :compileReleaseAidl NO-SOURCE
Task :CropLib:packageReleaseRenderscript NO-SOURCE
Task :Firebase:packageReleaseRenderscript NO-SOURCE
Task :compileReleaseRenderscript NO-SOURCE
Task :checkReleaseManifest
Task :generateReleaseBuildConfig
Task :prepareLintJar
Task :generateReleaseSources
Task :CropLib:compileReleaseRenderscript NO-SOURCE
Task :CropLib:generateReleaseBuildConfig
Task :CropLib:generateReleaseResValues
Task :CropLib:generateReleaseResources
Task :CropLib:packageReleaseResources
Task :CropLib:generateReleaseRFile
Task :CropLib:prepareLintJar
Task :CropLib:generateReleaseSources
Task :CropLib:javaPreCompileRelease
Task :CropLib:compileReleaseJavaWithJavac
Task :CropLib:bundleLibCompileRelease
Task :Firebase:compileReleaseRenderscript NO-SOURCE
Task :Firebase:generateReleaseBuildConfig
Task :Firebase:generateReleaseResValues
Task :Firebase:generateReleaseResources
Task :Firebase:packageReleaseResources
Task :Firebase:generateReleaseRFile
Task :Firebase:prepareLintJar
Task :Firebase:generateReleaseSources
Task :Firebase:javaPreCompileRelease
Task :Firebase:compileReleaseJavaWithJavac
Task :Firebase:bundleLibCompileRelease
Task :javaPreCompileRelease
Task :mainApkListPersistenceRelease
Task :generateReleaseResValues
Task :generateReleaseResources
Task :mergeReleaseResources
Task :createReleaseCompatibleScreenManifests
Task :processReleaseManifest
/Users/spin/Desktop/Yellows Unity App - Android 2019/Temp/gradleOut/src/main/AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity#android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
warn: removing resource com.Yellows.Monthly:string/save without required default value.
Task :processReleaseResources
Task :compileReleaseJavaWithJavac
Task :compileReleaseSources
Task :CropLib:prepareLintJarForPublish
Task :Firebase:prepareLintJarForPublish
Task :lintVitalRelease
Task :mergeReleaseShaders
Task :compileReleaseShaders
Task :generateReleaseAssets
Task :CropLib:mergeReleaseShaders
Task :CropLib:compileReleaseShaders
Task :CropLib:generateReleaseAssets
Task :CropLib:packageReleaseAssets
Task :Firebase:mergeReleaseShaders
Task :Firebase:compileReleaseShaders
Task :Firebase:generateReleaseAssets
Task :Firebase:packageReleaseAssets
Task :mergeReleaseAssets
Task :validateSigningRelease
Task :signingConfigWriterRelease
Task :processReleaseJavaRes NO-SOURCE
Task :CropLib:processReleaseJavaRes NO-SOURCE
Task :CropLib:bundleLibResRelease
Task :Firebase:processReleaseJavaRes NO-SOURCE
Task :Firebase:bundleLibResRelease
Task :transformResourcesWithMergeJavaResForRelease
Task :CropLib:bundleLibRuntimeRelease
Task :CropLib:mergeReleaseConsumerProguardFiles
Task :Firebase:bundleLibRuntimeRelease
Task :Firebase:mergeReleaseConsumerProguardFiles
Task :transformClassesAndResourcesWithR8ForRelease FAILED
R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
55 actionable tasks: 55 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at <8277255796414cc8b8865316c1676de5>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8277255796414cc8b8865316c1676de5>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8277255796414cc8b8865316c1676de5>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Build completed with a result of 'Failed'
UnityEditor.BuildPlayerWindow+BuildMethodException: 114 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

It looks like you're including the symbol android.support.annotation.FractionRes multiple times (see this).
My first guess is that you used to explode the JARs and now they're just included in your gradle file. You might want to clear out Assets/Plugins/Android (especially if it's filled with jar files) and force run the play services resolver afterwards. See this.
My second guess is that this has to do with the support library to androidx migration Firebase underwent in June. In this case, there are a few things you can do to resolve the issue.
First, make sure that you have the latest (6.5.0 as of right now) Unity SDK. Back in July, updates were made that fix these sorts of issues specifically.
Next, look at your play services resolver settings and make sure Patch mainTemplate.gradle and Use Jetifier are selected. Especially if you do have a mainTemplate.gradle file, this will help resolve some issues.
I've written up some information about the Play Services Resolver here, which I also linked above.
I hope something here helps!
--Patrick

Library com.android.support:support-annotations:26.1.0 should only exist once in the package:
implementation ("com.android.support:support-v4:26.1.0") {
exclude group: "com.android.support", module: "support-annotations"
}

What went wrong: Execution failed for task ':transformClassesAndResourcesWithR8ForRelease'.FAILED
if you using below lines in progaurd-project file, then comment them and Generate release build again.
-injars bin/classes
-injars libs

Related

Unity Build Failure: A failure occured while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

Build Failure
Hi! I always get this build failure whenever I try to build with the google cardboard XR plugin. I can build my project perfectly fine without the google cardboard XR plugin so I figured there was something wrong with the plugin or I did something wrong.
Here's what the console says:
Console Errors
Details of the 1st error:
Starting a Gradle Daemon, 2 incompatible and 2 stopped Daemons could not be reused, use --status for details
Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResValues
Task :launcher:generateReleaseResources
Task :unityLibrary:generateReleaseResValues
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResources
Task :launcher:createReleaseCompatibleScreenManifests
Task :launcher:extractDeepLinksRelease
Task :launcher:javaPreCompileRelease
Task :launcher:prepareLintJar
Task :unityLibrary:packageReleaseResources
Task :unityLibrary:extractDeepLinksRelease
Task :launcher:checkReleaseDuplicateClasses
Task :unityLibrary:generateReleaseBuildConfig
Task :unityLibrary:processReleaseManifest
Task :unityLibrary:javaPreCompileRelease
Task :unityLibrary:compileReleaseLibraryResources
Task :unityLibrary:prepareLintJarForPublish
Task :unityLibrary:parseReleaseLocalResources
Task :unityLibrary:mergeReleaseShaders
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseJniLibFolders
Task :unityLibrary:generateReleaseRFile
Task :launcher:processReleaseManifest
Task :launcher:mergeReleaseShaders
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:collectReleaseDependencies
Task :launcher:sdkReleaseDependencyData
Task :launcher:mergeReleaseJniLibFolders
Task :launcher:validateSigningRelease
Task :unityLibrary:compileReleaseJavaWithJavac
Task :launcher:mergeReleaseResources
Task :unityLibrary:mergeReleaseNativeLibs
Task :unityLibrary:stripReleaseDebugSymbols
Task :unityLibrary:copyReleaseJniLibsProjectOnly
Task :unityLibrary:bundleLibCompileToJarRelease
Task :unityLibrary:bundleLibRuntimeToJarRelease
Task :launcher:processReleaseResources FAILED
Task :launcher:mergeReleaseJavaResource
Task :launcher:desugarReleaseFileDependencies
37 actionable tasks: 37 executed
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)`
Details of 2nd error:
Note C:\Users\ADMIN\My project (3)\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\ADMIN.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:3:5-94: AAPT: error: resource android:color/system_neutral1_1000 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:4:5-94: AAPT: error: resource android:color/system_neutral1_900 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:5:5-93: AAPT: error: resource android:color/system_neutral1_0 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:6:5-94: AAPT: error: resource android:color/system_neutral1_800 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:7:5-94: AAPT: error: resource android:color/system_neutral1_700 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:8:5-94: AAPT: error: resource android:color/system_neutral1_600 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:9:5-94: AAPT: error: resource android:color/system_neutral1_500 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:10:5-94: AAPT: error: resource android:color/system_neutral1_400 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:11:5-94: AAPT: error: resource android:color/system_neutral1_300 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:12:5-94: AAPT: error: resource android:color/system_neutral1_200 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:13:5-94: AAPT: error: resource android:color/system_neutral1_100 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:14:5-93: AAPT: error: resource android:color/system_neutral1_50 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:15:5-93: AAPT: error: resource android:color/system_neutral1_10 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:16:5-102: AAPT: error: resource android:color/system_neutral2_1000 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:17:5-102: AAPT: error: resource android:color/system_neutral2_900 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:18:5-101: AAPT: error: resource android:color/system_neutral2_0 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:19:5-102: AAPT: error: resource android:color/system_neutral2_800 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:20:5-102: AAPT: error: resource android:color/system_neutral2_700 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:21:5-102: AAPT: error: resource android:color/system_neutral2_600 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:22:5-102: AAPT: error: resource android:color/system_neutral2_500 not found.
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 32s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)``
Details of 3rd error:
CommandInvokationFailure: Gradle build failed.
C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
Note: C:\Users\ADMIN\My project (3)\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\ADMIN.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:3:5-94: AAPT: error: resource android:color/system_neutral1_1000 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:4:5-94: AAPT: error: resource android:color/system_neutral1_900 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:5:5-93: AAPT: error: resource android:color/system_neutral1_0 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:6:5-94: AAPT: error: resource android:color/system_neutral1_800 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:7:5-94: AAPT: error: resource android:color/system_neutral1_700 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:8:5-94: AAPT: error: resource android:color/system_neutral1_600 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:9:5-94: AAPT: error: resource android:color/system_neutral1_500 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:10:5-94: AAPT: error: resource android:color/system_neutral1_400 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:11:5-94: AAPT: error: resource android:color/system_neutral1_300 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:12:5-94: AAPT: error: resource android:color/system_neutral1_200 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:13:5-94: AAPT: error: resource android:color/system_neutral1_100 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:14:5-93: AAPT: error: resource android:color/system_neutral1_50 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:15:5-93: AAPT: error: resource android:color/system_neutral1_10 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:16:5-102: AAPT: error: resource android:color/system_neutral2_1000 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:17:5-102: AAPT: error: resource android:color/system_neutral2_900 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:18:5-101: AAPT: error: resource android:color/system_neutral2_0 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:19:5-102: AAPT: error: resource android:color/system_neutral2_800 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:20:5-102: AAPT: error: resource android:color/system_neutral2_700 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:21:5-102: AAPT: error: resource android:color/system_neutral2_600 not found.
C:\Users\ADMIN\.gradle\caches\transforms-2\files-2.1\a0ebba694f8e6a95bc427eaef4894530\material-1.6.1\res\values-v31\values-v31.xml:22:5-102: AAPT: error: resource android:color/system_neutral2_500 not found.
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 32s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 2 incompatible and 2 stopped Daemons could not be reused, use --status for details
Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\UnityEditorFolder\2020.3.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResValues
Task :launcher:generateReleaseResources
Task :unityLibrary:generateReleaseResValues
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResources
Task :launcher:createReleaseCompatibleScreenManifests
Task :launcher:extractDeepLinksRelease
Task :launcher:javaPreCompileRelease
Task :launcher:prepareLintJar
Task :unityLibrary:packageReleaseResources
Task :unityLibrary:extractDeepLinksRelease
Task :launcher:checkReleaseDuplicateClasses
Task :unityLibrary:generateReleaseBuildConfig
Task :unityLibrary:processReleaseManifest
Task :unityLibrary:javaPreCompileRelease
Task :unityLibrary:compileReleaseLibraryResources
Task :unityLibrary:prepareLintJarForPublish
Task :unityLibrary:parseReleaseLocalResources
Task :unityLibrary:mergeReleaseShaders
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseJniLibFolders
Task :unityLibrary:generateReleaseRFile
Task :launcher:processReleaseManifest
Task :launcher:mergeReleaseShaders
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:collectReleaseDependencies
Task :launcher:sdkReleaseDependencyData
Task :launcher:mergeReleaseJniLibFolders
Task :launcher:validateSigningRelease
Task :unityLibrary:compileReleaseJavaWithJavac
Task :launcher:mergeReleaseResources
Task :unityLibrary:mergeReleaseNativeLibs
Task :unityLibrary:stripReleaseDebugSymbols
Task :unityLibrary:copyReleaseJniLibsProjectOnly
Task :unityLibrary:bundleLibCompileToJarRelease
Task :unityLibrary:bundleLibRuntimeToJarRelease
Task :launcher:processReleaseResources FAILED
Task :launcher:mergeReleaseJavaResource
Task :launcher:desugarReleaseFileDependencies
37 actionable tasks: 37 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <544f727be82940559155d775b51cba8c>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at <544f727be82940559155d775b51cba8c>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <544f727be82940559155d775b51cba8c>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <544f727be82940559155d775b51cba8c>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <786b546700bc48b68852821de5e46ca9>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)`
I've tried switching unity editor versions, reimporting the google cardboard XR Plugins and followed the quickstart https://developers.google.com/cardboard/develop/unity/quickstart, and reinstalled the android build support but nothing happened and I still get the same errors.

Unity SignReleaseBundle Failed

I am trying to build my Unity Project to Android but I keep getting the same Error when the build arrives at the gradle build. The error says that the task: signReleaseBundle failed. I am currently using Unity 2018.4.13f1. I was able to build it without any problems a few times but suddenly the next day, I tried to make a Update because I discovered a pretty bad bug, but it was then it stop working and I start receiving the error messages.
The full error:
CommandInvokationFailure: Gradle build failed.
D:\Programme\Unity Hub\2018.4.8f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "D:\Programme\Unity Hub\2018.4.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':signReleaseBundle'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: jarsigner.exefailed with exit code 1 :
jarsigner: key associated with artyon not a private key
* 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 12s
]
stdout[
> Configure project :
WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
The current default is 'true'.
> Task :preBuild UP-TO-DATE
> Task :extractProguardFiles
> Task :preReleaseBuild UP-TO-DATE
> Task :compileReleaseRenderscript NO-SOURCE
> Task :generateReleaseResValues UP-TO-DATE
> Task :generateReleaseResources UP-TO-DATE
> Task :mergeReleaseResources UP-TO-DATE
> Task :checkReleaseManifest UP-TO-DATE
> Task :createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :mainApkListPersistenceRelease UP-TO-DATE
> Task :processReleaseManifest
> Task :bundleReleaseResources
> Task :mergeReleaseShaders UP-TO-DATE
> Task :compileReleaseShaders UP-TO-DATE
> Task :generateReleaseAssets UP-TO-DATE
> Task :mergeReleaseAssets
> Task :compileReleaseAidl NO-SOURCE
> Task :generateReleaseBuildConfig UP-TO-DATE
> Task :prepareLintJar UP-TO-DATE
> Task :generateReleaseSources UP-TO-DATE
> Task :javaPreCompileRelease UP-TO-DATE
> Task :processReleaseResources
> Task :compileReleaseJavaWithJavac UP-TO-DATE
> Task :processReleaseJavaRes NO-SOURCE
> Task :transformResourcesWithMergeJavaResForRelease UP-TO-DATE
> Task :transformClassesAndResourcesWithR8ForRelease
R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
> Task :mergeReleaseJniLibFolders UP-TO-DATE
> Task :transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
> Task :transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
> Task :buildReleasePreBundle
> Task :collectReleaseDependencies UP-TO-DATE
> Task :configureReleaseDependencies UP-TO-DATE
> Task :packageReleaseBundle
> Task :validateSigningRelease UP-TO-DATE
> Task :signingConfigWriterRelease UP-TO-DATE
> Task :signReleaseBundle FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
29 actionable tasks: 9 executed, 20 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7ba523db75d04b42a8b9a4dd9587e521>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I hope someone can help me.
The problem is your passwords may be incorrect when you enter them on build settings.
check your passwords then it will work fine.
I received the same error when I built my own game!!! But I had already succeeded in building several times!!!
I tried changing the version of gradle, and edit AndroidManifest file , erasing all the plugins and reinserting them, but there is no sign that the error will be cured.
I thought it was a mistake, but when I re-entered the Keystore password and built it without error !!!
The error I struggled with for three days was due to the wrong Keystore password ...
Anyway, I'm happy that the error was fixed. Please be careful about the wrong password of Keystore so as not to make such a terrible mistake ...
I used Unity 2019.4.28f1 in MacBook Pro
Simple solution: upgrade plugin

Unity Android Build Error: failed to read PNG signature: file does not start with PNG signature

I am working on 2D game in Unity.
When building for Android, Gradle build fails with following error:
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2019.1.14f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.1.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
C:\Dev\Unity\Teaventures\Temp\gradleOut\native_plugins_lib\build\intermediates\packaged_res\release\drawable\app_icon_custom_coloured.png: error: failed to read PNG signature: file does not start with PNG signature.
C:\Dev\Unity\Teaventures\Temp\gradleOut\native_plugins_lib\build\intermediates\packaged_res\release\drawable\app_icon_custom_coloured.png: error: file failed to compile.
* 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 5s
]
stdout[
> Task :preBuild UP-TO-DATE
> Task :native_plugins_lib:preBuild UP-TO-DATE
> Task :native_plugins_lib:preReleaseBuild UP-TO-DATE
> Task :native_plugins_lib:checkReleaseManifest
> Task :native_plugins_lib:processReleaseManifest
> Task :twitter_lib:preBuild UP-TO-DATE
> Task :twitter_lib:preReleaseBuild UP-TO-DATE
> Task :twitter_lib:checkReleaseManifest
> Task :twitter_lib:processReleaseManifest
> Task :voxelbusters_utility_lib:preBuild UP-TO-DATE
> Task :voxelbusters_utility_lib:preReleaseBuild UP-TO-DATE
> Task :voxelbusters_utility_lib:checkReleaseManifest
> Task :voxelbusters_utility_lib:processReleaseManifest
> Task :youtube_lib:preBuild UP-TO-DATE
> Task :youtube_lib:preReleaseBuild UP-TO-DATE
> Task :youtube_lib:checkReleaseManifest
> Task :youtube_lib:processReleaseManifest
> Task :native_plugins_lib:packageReleaseRenderscript NO-SOURCE
> Task :twitter_lib:packageReleaseRenderscript NO-SOURCE
> Task :voxelbusters_utility_lib:packageReleaseRenderscript NO-SOURCE
> Task :youtube_lib:packageReleaseRenderscript NO-SOURCE
> Task :native_plugins_lib:compileReleaseRenderscript NO-SOURCE
> Task :native_plugins_lib:generateReleaseResValues
> Task :native_plugins_lib:generateReleaseResources
> Task :native_plugins_lib:packageReleaseResources
> Task :twitter_lib:compileReleaseRenderscript NO-SOURCE
> Task :twitter_lib:generateReleaseResValues
> Task :twitter_lib:generateReleaseResources
> Task :twitter_lib:packageReleaseResources
> Task :voxelbusters_utility_lib:compileReleaseRenderscript NO-SOURCE
> Task :preReleaseBuild
> Task :compileReleaseRenderscript NO-SOURCE
> Task :generateReleaseResValues UP-TO-DATE
> Task :generateReleaseResources UP-TO-DATE
> Task :voxelbusters_utility_lib:generateReleaseResValues
> Task :voxelbusters_utility_lib:generateReleaseResources
> Task :voxelbusters_utility_lib:packageReleaseResources
> Task :youtube_lib:compileReleaseRenderscript NO-SOURCE
> Task :youtube_lib:generateReleaseResValues
> Task :youtube_lib:generateReleaseResources
> Task :youtube_lib:packageReleaseResources
> Task :mergeReleaseResources FAILED
19 actionable tasks: 18 executed, 1 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1e5e55a0ebac44e989773ba5d6df4794>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Already checked if my provided Appstore .png Image is corrupted, it isnĀ“t.
So somehow this happens during the building Process.
Is there a way to debug this?
Am I missing something reading the Error Log?
I appreciate any hint that could help me researching for a solution.
Thank you very Much!
Korbi
EDIT: link to corrpted file
Add this code in android/app/build.gradle
android {
...
aaptOptions {
cruncherEnabled = false
}
...
}
Found the folder the corrupted file was located:
Assets\Plugins\Android\native_plugins_lib\res\drawable
Fixing the corrupted file fixed my Issue.

CommandInvokationFailure: Gradle build failed. New problem

I am getting this error can anyone help me how can I fix it so I can build the apk. So far I have changed from gradle to internal but still no fix. Also I am using unity 2018.3.0f3. i have read many post but still I was not able to solve it.
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2018.3.0f2/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/Hub/Editor/2018.3.0f2/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':IronSource:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: /Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/IronSource/build/intermediates/aapt_friendly_merged_manifests/release/processReleaseManifest/aapt/AndroidManifest.xml:146: error: resource integer/google_play_services_version (aka com.Company.ProductName:integer/google_play_services_version) not found.
error: failed processing manifest.
Command: /Users/ompatel/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-osx.jar/d7ea5946da9faffe0caa1c17db8db060/aapt2-3.2.0-4818971-osx/aapt2 link -I\
/Users/ompatel/Library/Android/sdk/platforms/android-28/android.jar\
--manifest\
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/IronSource/build/intermediates/aapt_friendly_merged_manifests/release/processReleaseManifest/aapt/AndroidManifest.xml\
-o\
/var/folders/sp/kjxv1v1s3jbgn7c1qydkgc9m0000gn/T/aapt-6683475634438936978-out\
--auto-add-overlay\
--non-final-ids\
-0\
apk\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-osx Daemon #0
* 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 11s
]
stdout[
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
Android SDK Build Tools 28.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
Android SDK Build Tools 28.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
Android SDK Build Tools 28.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
Android SDK Build Tools 28.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (28.0.1) is ignored, as it is below the minimum supported version (28.0.2) for Android Gradle Plugin 3.2.0.
Android SDK Build Tools 28.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
:checkReleaseClasspath UP-TO-DATE
:preBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:preBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:preReleaseBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:checkReleaseManifest
:GooglePlayGamesManifest.plugin:processReleaseManifest
:IronSource:preBuild UP-TO-DATE
:IronSource:preReleaseBuild UP-TO-DATE
:IronSource:checkReleaseManifest
:IronSource:processReleaseManifest
:OneSignalConfig:preBuild UP-TO-DATE
:OneSignalConfig:preReleaseBuild UP-TO-DATE
:OneSignalConfig:checkReleaseManifest
:OneSignalConfig:processReleaseManifest
:sdkbox_review_lib:preBuild UP-TO-DATE
:sdkbox_review_lib:preReleaseBuild UP-TO-DATE
:sdkbox_review_lib:checkReleaseManifest
:sdkbox_review_lib:processReleaseManifest
:preReleaseBuild UP-TO-DATE
:GooglePlayGamesManifest.plugin:compileReleaseAidl NO-SOURCE
:IronSource:compileReleaseAidl NO-SOURCE
:OneSignalConfig:compileReleaseAidl NO-SOURCE
:sdkbox_review_lib:compileReleaseAidl NO-SOURCE
:compileReleaseAidl NO-SOURCE
:GooglePlayGamesManifest.plugin:packageReleaseRenderscript NO-SOURCE
:IronSource:packageReleaseRenderscript NO-SOURCE
:OneSignalConfig:packageReleaseRenderscript NO-SOURCE
:sdkbox_review_lib:packageReleaseRenderscript NO-SOURCE
:compileReleaseRenderscript UP-TO-DATE
:checkReleaseManifest UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:prepareLintJar UP-TO-DATE
:mainApkListPersistenceRelease UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:GooglePlayGamesManifest.plugin:compileReleaseRenderscript
:GooglePlayGamesManifest.plugin:generateReleaseResValues
:GooglePlayGamesManifest.plugin:generateReleaseResources
:GooglePlayGamesManifest.plugin:packageReleaseResources
:IronSource:compileReleaseRenderscript
:IronSource:generateReleaseResValues
:IronSource:generateReleaseResources
:IronSource:packageReleaseResources
:OneSignalConfig:compileReleaseRenderscript
:OneSignalConfig:generateReleaseResValues
:OneSignalConfig:generateReleaseResources
:OneSignalConfig:packageReleaseResources
:sdkbox_review_lib:compileReleaseRenderscript
:sdkbox_review_lib:generateReleaseResValues
:sdkbox_review_lib:generateReleaseResources
:sdkbox_review_lib:packageReleaseResources
:mergeReleaseResources UP-TO-DATE
:createReleaseCompatibleScreenManifests UP-TO-DATE
:processReleaseManifest
:splitsDiscoveryTaskRelease UP-TO-DATE
:GooglePlayGamesManifest.plugin:generateReleaseRFile
:IronSource:generateReleaseRFile
:OneSignalConfig:generateReleaseRFile
:sdkbox_review_lib:generateReleaseRFile
:processReleaseResources
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml:82: warn: duplicate definitions of 'C2D_MESSAGE', overriding previous.
:generateReleaseSources
:GooglePlayGamesManifest.plugin:generateReleaseBuildConfig
:GooglePlayGamesManifest.plugin:prepareLintJar UP-TO-DATE
:GooglePlayGamesManifest.plugin:generateReleaseSources
:GooglePlayGamesManifest.plugin:javaPreCompileRelease
:GooglePlayGamesManifest.plugin:compileReleaseJavaWithJavac
:GooglePlayGamesManifest.plugin:processReleaseJavaRes NO-SOURCE
:GooglePlayGamesManifest.plugin:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:IronSource:generateReleaseBuildConfig
:IronSource:prepareLintJar UP-TO-DATE
:IronSource:generateReleaseSources
:IronSource:javaPreCompileRelease
:IronSource:compileReleaseJavaWithJavac
:IronSource:processReleaseJavaRes NO-SOURCE
:IronSource:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:OneSignalConfig:generateReleaseBuildConfig
:OneSignalConfig:prepareLintJar UP-TO-DATE
:OneSignalConfig:generateReleaseSources
:OneSignalConfig:javaPreCompileRelease
:OneSignalConfig:compileReleaseJavaWithJavac
:OneSignalConfig:processReleaseJavaRes NO-SOURCE
:OneSignalConfig:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:sdkbox_review_lib:generateReleaseBuildConfig
:sdkbox_review_lib:prepareLintJar UP-TO-DATE
:sdkbox_review_lib:generateReleaseSources
:sdkbox_review_lib:javaPreCompileRelease
:sdkbox_review_lib:compileReleaseJavaWithJavac
:sdkbox_review_lib:processReleaseJavaRes NO-SOURCE
:sdkbox_review_lib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:javaPreCompileRelease UP-TO-DATE
:compileReleaseJavaWithJavac UP-TO-DATE
:compileReleaseNdk NO-SOURCE
:compileReleaseSources UP-TO-DATE
:lintVitalRelease
:mergeReleaseShaders UP-TO-DATE
:compileReleaseShaders UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:GooglePlayGamesManifest.plugin:mergeReleaseShaders
:GooglePlayGamesManifest.plugin:compileReleaseShaders
:GooglePlayGamesManifest.plugin:generateReleaseAssets
:GooglePlayGamesManifest.plugin:packageReleaseAssets
:IronSource:mergeReleaseShaders
:IronSource:compileReleaseShaders
:IronSource:generateReleaseAssets
:IronSource:packageReleaseAssets
:OneSignalConfig:mergeReleaseShaders
:OneSignalConfig:compileReleaseShaders
:OneSignalConfig:generateReleaseAssets
:OneSignalConfig:packageReleaseAssets
:sdkbox_review_lib:mergeReleaseShaders
:sdkbox_review_lib:compileReleaseShaders
:sdkbox_review_lib:generateReleaseAssets
:sdkbox_review_lib:packageReleaseAssets
:mergeReleaseAssets
:transformClassesWithDexBuilderForRelease
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/libs/CustomActivity.jar: D8: Type `com.sdkbox.plugin.SDKBox` was not found, it is required for default or static interface methods desugaring of `void com.sdkbox.activity.CustomActivity.onActivityResult(int, int, android.content.Intent)`
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/libs/AF-Android-SDK.jar: D8: Type `com.google.android.gms.iid.InstanceIDListenerService` was not found, it is required for default or static interface methods desugaring of `void com.appsflyer.GcmInstanceIdListener.onTokenRefresh()`
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/libs/AF-Android-SDK.jar: D8: Type `com.google.android.gms.iid.InstanceID` was not found, it is required for default or static interface methods desugaring of `void com.appsflyer.GcmInstanceIdListener.onTokenRefresh()`
/Users/ompatel/.gradle/caches/transforms-1/files-1.1/com.google.firebase.firebase-messaging-12.0.1.aar/b77eb6893d26feb2ecf9a70f54c0c6f0/jars/classes.jar: D8: Type `com.google.android.gms.measurement.AppMeasurement` was not found, it is required for default or static interface methods desugaring of `com.google.android.gms.measurement.AppMeasurement com.google.firebase.messaging.zzc.zzde(android.content.Context)`
/Users/ompatel/.gradle/caches/transforms-1/files-1.1/com.google.firebase.firebase-messaging-12.0.1.aar/b77eb6893d26feb2ecf9a70f54c0c6f0/jars/classes.jar: D8: Type `com.google.android.gms.measurement.AppMeasurement` was not found, it is required for default or static interface methods desugaring of `com.google.android.gms.measurement.AppMeasurement com.google.firebase.messaging.zzd.zzde(android.content.Context)`
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/sdkbox_review_lib/libs/PluginReview.jar: D8: Type `com.sdkbox.plugin.SDKBox` was not found, it is required for default or static interface methods desugaring of `void com.sdkbox.plugin.PluginReview$1.run()`
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/sdkbox_review_lib/libs/PluginReview.jar: D8: Type `com.sdkbox.plugin.SDKBox` was not found, it is required for default or static interface methods desugaring of `void com.sdkbox.plugin.PluginReviewListener.onNegativeBtnClicked()`
/Users/ompatel/Desktop/Unity Games Zips/1010 ironsource update/1010 ironsource update/Temp/gradleOut/sdkbox_review_lib/libs/PluginReview.jar: D8: Interface `com.sdkbox.plugin.PluginListener` not found. It's needed to make sure desugaring of `com.sdkbox.plugin.PluginReview` is correct. Desugaring will assume that this interface has no default method.
:transformDexArchiveWithExternalLibsDexMergerForRelease
:transformDexArchiveWithDexMergerForRelease
:mergeReleaseJniLibFolders UP-TO-DATE
:GooglePlayGamesManifest.plugin:compileReleaseNdk NO-SOURCE
:GooglePlayGamesManifest.plugin:mergeReleaseJniLibFolders
:GooglePlayGamesManifest.plugin:transformNativeLibsWithMergeJniLibsForRelease
:GooglePlayGamesManifest.plugin:transformNativeLibsWithIntermediateJniLibsForRelease
:IronSource:compileReleaseNdk NO-SOURCE
:IronSource:mergeReleaseJniLibFolders
:IronSource:transformNativeLibsWithMergeJniLibsForRelease
:IronSource:transformNativeLibsWithIntermediateJniLibsForRelease
:OneSignalConfig:compileReleaseNdk NO-SOURCE
:OneSignalConfig:mergeReleaseJniLibFolders
:OneSignalConfig:transformNativeLibsWithMergeJniLibsForRelease
:OneSignalConfig:transformNativeLibsWithIntermediateJniLibsForRelease
:sdkbox_review_lib:compileReleaseNdk NO-SOURCE
:sdkbox_review_lib:mergeReleaseJniLibFolders
:sdkbox_review_lib:transformNativeLibsWithMergeJniLibsForRelease
:sdkbox_review_lib:transformNativeLibsWithIntermediateJniLibsForRelease
:transformNativeLibsWithMergeJniLibsForRelease
:checkReleaseLibraries UP-TO-DATE
:processReleaseJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForRelease
:validateSigningRelease UP-TO-DATE
:packageRelease
:assembleRelease
:GooglePlayGamesManifest.plugin:extractReleaseAnnotations
:GooglePlayGamesManifest.plugin:mergeReleaseConsumerProguardFiles UP-TO-DATE
:GooglePlayGamesManifest.plugin:transformResourcesWithMergeJavaResForRelease
:GooglePlayGamesManifest.plugin:transformClassesAndResourcesWithSyncLibJarsForRelease
:GooglePlayGamesManifest.plugin:transformNativeLibsWithSyncJniLibsForRelease
:GooglePlayGamesManifest.plugin:bundleReleaseAar
:GooglePlayGamesManifest.plugin:compileReleaseSources
:GooglePlayGamesManifest.plugin:mergeReleaseResources
:GooglePlayGamesManifest.plugin:verifyReleaseResources
:GooglePlayGamesManifest.plugin:assembleRelease
:IronSource:extractReleaseAnnotations
:IronSource:mergeReleaseConsumerProguardFiles UP-TO-DATE
:IronSource:transformResourcesWithMergeJavaResForRelease
:IronSource:transformClassesAndResourcesWithSyncLibJarsForRelease
:IronSource:transformNativeLibsWithSyncJniLibsForRelease
:IronSource:bundleReleaseAar
:IronSource:compileReleaseSources
:IronSource:mergeReleaseResources
:IronSource:verifyReleaseResources FAILED
112 actionable tasks: 88 executed, 24 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
This issue is related to the sdk version ur using.
Go to control panel and unintall the current android sdk tool then.
Go to Edit/user preferences inside unity and then select sdk and download from there and install it.
It should work then i guess. It worked for me though.
It looks like you are using the IronSource unity plugin. There should be an AndroidManifest.xml in Assets/Plugins/android/ironSource, remove this part:
...
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
...
It also looks like the IronSource Unity plugin AndroidManifest.xml and AndroidManifest.xml from play-services-basement.aar, which IronSource has a dependency to, both have those same lines and they collide.
I contacted IronSource support because I had the same problem. They got back to me and said that I should remove those lines. Also that they will remove those lines from the plugin in the next release.

Firebase Messaging Package for Unity gives problems when building with Gradle

At first I could build and install the app on my Android device but as I launched it crashed, the Logcat was saying that a Firebase library was not included in the package and advising to use the Play Services Jar Resolver. So I used it.
Now I have this error when trying to build my app. (excuse me, I had some issues understanding how to insert a code snippet :) )
CommandInvokationFailure: Gradle build failed.
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"
stderr[
/Users/andreamarchetti/Desktop/Squarcuit/Temp/gradleOut/src/main/AndroidManifest.xml:4: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]
<application android:icon="#drawable/app_icon" android:label="#string/app_name" android:debuggable="false" android:isGame="true" android:banner="#drawable/app_banner">
Explanation for issues of type "HardcodedDebugMode":
It's best to leave out the android:debuggable attribute from the manifest.
If you do, then the tools will automatically insert android:debuggable=true
when building an APK to debug on an emulator or device. And when you
perform a release build, such as Exporting APK, it will automatically set
it to false.
If on the other hand you specify a specific value in the manifest file,
then the tools will always use it. This can lead to accidentally publishing
your app with debug information.
1 errors, 0 warnings
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:compileReleaseNdk UP-TO-DATE
:Firebase:compileLint
:Firebase:copyReleaseLint UP-TO-DATE
:Firebase:mergeReleaseProguardFiles
:Firebase:packageReleaseRenderscript UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:prepareReleaseDependencies
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:Firebase:compileReleaseAidl
:Firebase:generateReleaseBuildConfig
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:Firebase:processReleaseManifest
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:incrementalReleaseJavaCompilationSafeguard
:Firebase:compileReleaseJavaWithJavac
:Firebase:processReleaseJavaRes UP-TO-DATE
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNative_libsWithMergeJniLibsForRelease
:Firebase:transformNative_libsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:prepareAnimatedVectorDrawable2340Library
:prepareAppcompatV72340Library
:prepareCardviewV72340Library
:prepareCustomtabs2340Library
:prepareFacebookAndroidSdk4170Library
:prepareFacebookAndroidWrapper794Library
:prepareFirebaseAppUnity401Library
:prepareFirebaseCommon1100Library
:prepareFirebaseIid1100Library
:prepareFirebaseMessaging1100Library
:prepareFirebaseMessagingUnity401Library
:prepareGradleOutFirebaseUnspecifiedLibrary
:preparePlayServicesBase1100Library
:preparePlayServicesBasement1100Library
:preparePlayServicesTasks1100Library
:prepareSupportCompat2520Library
:prepareSupportCoreUi2520Library
:prepareSupportCoreUtils2520Library
:prepareSupportFragment2520Library
:prepareSupportMediaCompat2520Library
:prepareSupportV42340Library
:prepareSupportV42520Library
:prepareSupportVectorDrawable2340Library
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:mergeReleaseAssets
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseNdk UP-TO-DATE
:compileReleaseSources
:lintVitalRelease
:prePackageMarkerForRelease
:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:transformClassesWithDexForRelease FAILED
BUILD FAILED
Total time: 45.841 secs
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.HostView:OnGUI()
I do not have - android:debuggable="false" -anywhere in any AndroidManifest.xml in my project.
I think the problem was that I had multiple .aar files of the same package but different versions. So Facebook SDK was conflicting with some Google Firebase stuff. I deleted the Facebook SDK .aar (which were older versions).

Categories

Resources