CommandInvokationFailure: Gradle build failed. New problem - android

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.

Related

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

Why is my Gradle Failing on my Unity Android Build?

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

cant compile app on phone gap - new error with depriciation

I get the below errors in phonegap build. this is even when building an old version of the app that used to work. not understanding the error, any help??
Build Date: 2018-05-25 16:11:42 +0000
PLUGIN OUTPUT
Fetching plugin "cordova-plugin-inappbrowser" via npm
Installing "cordova-plugin-inappbrowser" at "3.0.0" for android
Fetching plugin "onesignal-cordova-plugin#^2.3.1" via npm
Installing "onesignal-cordova-plugin" at "2.4.1" for android
Subproject Path: CordovaLib
Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" at "1.3.3" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do not need this plugin since the whitelist will be built in.
Fetching plugin "cordova-plugin-geolocation#^2.4.1" via npm
Installing "cordova-plugin-geolocation" at "2.4.3" for android
Fetching plugin "cordova-plugin-compat#^1.0.0" via npm
Installing "cordova-plugin-compat" at "1.2.0" for android
COMPILE OUTPUT
:wrapper
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_3icce6xsgr7rsvstratajpe9b.run(/project/build.gradle:138)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders
:CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:processReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareAndroidArchCoreRuntime110Library
:prepareAndroidArchLifecycleLivedataCore110Library
:prepareAndroidArchLifecycleRuntime110Library
:prepareAndroidArchLifecycleViewmodel110Library
:prepareComAndroidSupportCustomtabs2711Library
:prepareComAndroidSupportSupportCompat2711Library
:prepareComAndroidSupportSupportCoreUi2711Library
:prepareComAndroidSupportSupportCoreUtils2711Library
:prepareComAndroidSupportSupportFragment2711Library
:prepareComAndroidSupportSupportMediaCompat2711Library
:prepareComAndroidSupportSupportV42711Library
:prepareComGoogleAndroidGmsPlayServicesBase1201Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1201Library
:prepareComGoogleAndroidGmsPlayServicesBasement1201Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1201Library
:prepareComGoogleAndroidGmsPlayServicesLocation1201Library
:prepareComGoogleAndroidGmsPlayServicesLocationLicense1201Library
:prepareComGoogleAndroidGmsPlayServicesTasks1201Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1201Library
:prepareComGoogleFirebaseFirebaseCommon1201Library
:prepareComGoogleFirebaseFirebaseCommonLicense1201Library
:prepareComGoogleFirebaseFirebaseIid1201Library
:prepareComGoogleFirebaseFirebaseIidLicense1201Library
:prepareComGoogleFirebaseFirebaseMessaging1201Library
:prepareComGoogleFirebaseFirebaseMessagingLicense1201Library
:prepareComOnesignalOneSignal391Library
:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResourcesERROR: In FontFamilyFont, unable to find attribute android:font
ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In FontFamilyFont, unable to find attribute android:fontWeight
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.249 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
ERROR: In FontFamilyFont, unable to find attribute android:font
ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In FontFamilyFont, unable to find attribute android:fontWeight
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
In your platforms/android folder that contains the build.gradle file, create another file called build-extras.gradle and put the following inside of it:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
I had the same issue and this fixed it for me. I also had to update AndroidManifest.xml to point to the correct icon folder because it changed that config variable to the mipmap folders instead of the drawable folders.
Set your compileSdkVersion to 23 in your module's build.gradle file and see

Build failed with message “processF0F1DebugResources FAILED”

I'm trying to build this template for android, which I haven't modified yet. But the build fails with this message:
Searching for devices...
Executing before-liveSync hook from C:\repos\rolagroup-frontend\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
> Configuring > 0/3 projects > root project
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-social-login
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\repos\rolagroup-frontend\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\include.gradle
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\nativescript-social-login\include.gradle
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\tns-core-modules-widgets\include.gradle
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: C:\repos\rolagroup-frontend\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_cogdyo42bssvgewop3zivk6w6.run(C:\repos\rolagroup-frontend\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:preBuild UP-TO-DATE
:preF0F1DebugBuild UP-TO-DATE
:checkF0F1DebugManifest
:preF0F1ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:prepareComDigitsSdkAndroidDigits1103Library UP-TO-DATE
:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetComposer104Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetUi1102Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitter1132Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitterCore167Library UP-TO-DATE
:prepareIoFabricSdkAndroidFabric1311Library UP-TO-DATE
:prepareRolagroupfrontendRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0F1DebugDependencies
:compileF0F1DebugAidl UP-TO-DATE
:compileF0F1DebugRenderscript UP-TO-DATE
:generateF0F1DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser
Running full build
finished with reading lines with js files
:asbg:generateBindings
:generateF0F1DebugResValues UP-TO-DATE
:generateF0F1DebugResources UP-TO-DATE
:mergeF0F1DebugResources UP-TO-DATE
:processF0F1DebugManifest UP-TO-DATE
:processF0F1DebugResources
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:17:24-47: AAPT: No resource found that matches the given name (at 'value' with value '#string/facebook_app_id').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:22:24-40: AAPT: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:42:24-40: AAPT: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:47:28-57: AAPT: No resource found that matches the given name (at 'label' with value '#string/title_activity_kimera').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'value' with value '#string/facebook_app_id').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:38: error: Error: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:44: error: Error: No resource found that matches the given name (at 'label' with value '#string/title_activity_kimera').
:processF0F1DebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processF0F1DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 15.17 secs
Unable to apply changes on device: 192.168.1.5:5555. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\repos\rolagroup-frontend\hooks\after-watch\nativescript-dev-typescript.js
This is my packages.json:
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.rolagroupfrontend",
"tns-android": {
"version": "3.1.1"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"#angular/animations": "4.2.5",
"#angular/common": "4.2.5",
"#angular/compiler": "4.2.5",
"#angular/core": "4.2.5",
"#angular/forms": "4.2.5",
"#angular/http": "4.2.5",
"#angular/platform-browser": "4.2.5",
"#angular/router": "4.2.5",
"nativescript-angular": "4.2.0",
"nativescript-gradient": "^2.0.1",
"nativescript-localize": "^2.0.1",
"nativescript-social-login": "^1.6.0",
"nativescript-theme-core": "1.0.4",
"reflect-metadata": "0.1.10",
"rxjs": "5.4.3",
"tns-core-modules": "3.1.1",
"validator": "^8.1.0",
"zone.js": "0.8.16"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"codelyzer": "3.1.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "1.3.0",
"nativescript-dev-typescript": "0.5.0",
"node-sass": "4.5.3",
"tslint": "5.6.0",
"typescript": "2.4.2"
}
}
Tried removing and then adding again tns platform android, also reinstalling the npm packages; but no luck.
I have SDK Build Tools and SDK Platform 23 and 25 installed. I'm running NativeScript 3.1.3, tns-core-modules 3.1.1 and tns-android 3.1.1 on Windows 10 x64. Any ideas?
UPDATE: Also tried adding those values manually to strings.xml, but that file just gets regenerated in every tns run.
Solved the app_id and title_activity_kimera by addind app.name to the NativeScript-localize json (yes, I should really read the docs).
Had to remove the social login plugin since it requires the facebook_app_id string added manually to strings.xml and this file its generated by the localization plugin.

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