Open seebee404 opened 6 years ago
The error is:
CommandInvokationFailure: Gradle build failed. C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
C:\Users\hypod\Documents\Unity Projects\Test\Temp\gradleOut\src\main\AndroidManifest.xml:4:90-122 Error:
Attribute application@label value=(@string/app_name) from AndroidManifest.xml:4:90-122
is also present at [:androidtts-release:] AndroidManifest.xml:13:9-35 value=(NAtive TTS).
Suggestion: add 'tools:replace="android:label"' to
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':processReleaseManifest'.
Manifest merger failed : Attribute application@label value=(@string/app_name) from AndroidManifest.xml:4:90-122 is also present at [:androidtts-release:] AndroidManifest.xml:13:9-35 value=(NAtive TTS). Suggestion: add 'tools:replace="android:label"' to
element at AndroidManifest.xml:4:3-16:17 to override.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 0s ] stdout[ :preBuild UP-TO-DATE :preReleaseBuild UP-TO-DATE :compileReleaseAidl UP-TO-DATE :compileReleaseRenderscript UP-TO-DATE :checkReleaseManifest UP-TO-DATE :generateReleaseBuildConfig UP-TO-DATE :prepareLintJar UP-TO-DATE :generateReleaseResValues UP-TO-DATE :generateReleaseResources UP-TO-DATE :mergeReleaseResources UP-TO-DATE :createReleaseCompatibleScreenManifests UP-TO-DATE :processReleaseManifest
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processReleaseManifest FAILED
10 actionable tasks: 1 executed, 9 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.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1 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)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
My manifest is
<?xml version="1.0" encoding="UTF-8"?>
-<manifest xmlns:tools="http://schemas.android.com/tools" android:versionName="1.0" android:versionCode="1" package="ir.hoseinporazar.androidtts" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="14"/>
<application tools:replace="android:label" android:supportsRtl="true" android:label="NAtive TTS" android:allowBackup="true"> </application>
</manifest>
What worked for me is,
Install the package
Unzip the aar file in Assets/Plugins/Android into same folder. Delete the aar file.
Change the Android Manifest to the following:
`<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="ir.hoseinporazar.androidtts" android:versionCode="1" android:versionName="1.0" > <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> <application android:allowBackup="true" android:label="NAtive TTS" android:supportsRtl="true" tools:replace="android:label" > <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:name= "com.lukewaffel.androidgallery.Gallery"></activity>
</application>
`
I am posting this late, but probably will help someone..
Find the manifest.xml file described by error in the temp folder, copy it and past in the assets->plugins->android directory and rename it to AndroidManifest.xml
Then edit it and find the
For example, I had to paste tools:replace="android:label" so it would look like <application ... tools:replace="android:label">
ps: I spent a whole day on this, if this worked for you, upvote so others can find it. If it didn't please comment.
What worked for me is,
- Install the package
- Unzip the aar file in Assets/Plugins/Android into same folder. Delete the aar file.
- Change the Android Manifest to the following:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="ir.hoseinporazar.androidtts" android:versionCode="1" android:versionName="1.0" > <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> <application android:allowBackup="true" android:label="NAtive TTS" android:supportsRtl="true" tools:replace="android:label" > <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> </activity> <activity android:name= "com.lukewaffel.androidgallery.Gallery"></activity> </application> </manifest>
This works. Thanks a lot!
bal amar