AndroidManifest-main.xml merging error
I'm trying to build a simple vr application onto a samsung s7 edge, using unity 5.6.1f1.
When I build, I get the error message "unable to merge android manifests. See the console for more details".
It seems to be a slightly different error from others who have this problem, here are the two clues I get from the console:
C:\Users\n\Documents\VRtest3\Temp\StagingArea\AndroidManifest-main.xml:4:125-150 Error:
Attribute application@debuggable value=(true) from AndroidManifest-main.xml:4:125-150
is also present at AndroidManifest.xml:3:148-174 value=(false).
Suggestion: add 'tools:replace="android:debuggable"' to <application> element at AndroidManifest-main.xml:4:3-12:17 to override.
C:\Users\n\Documents\VRtest3\Temp\StagingArea\AndroidManifest-main.xml:4:16-57 Error:
Attribute application@theme value=(@style/UnityThemeSelector) from AndroidManifest-main.xml:4:16-57 is also present at AndroidManifest.xml:3:83-147 value=(@android:style/Theme.Black.NoTitleBar.Fullscreen).
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest-main.xml:4:3-12:17 to override.
Thanks in advance for any info on the easiest way to solve this.
*Edit - I found a way to change the AndroidManifest.xml to solve these two errors, but I then recieve an error that "Theme.Black.NoTitleBar" cannot be found... perhaps I just don't have the correct version of the sdk/ndk/unity installed?
I have the same problem, can you comment how do you resolve it. zorry for my english
Answer by AugMac · May 25, 2017 at 02:54 PM
Hey @bbio , same issue here using unity 5.6.1f1.
Try this (worked for me):
Windows -> C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Apk (Apple should be similar)
Save the original AndroidManifest.xml. (just in case)
Use ADM permission to edit the file and remove the lines:
android:debuggable="true" android:theme="@style/UnityThemeSelector"
Save it and build your app again.
Goodluck!!
P.S. My Android SDK config:
Platform -> Android-25 ( 3 )
Platform-Tools -> 25.0.6
Build-tools -> 23.0.3
Tools -> 26.0.1
Thanks, I was having the same issue though in the error log it is suggesting to make changes in the manifest file, I did those changes but that didn't work. I went through your suggestion and it worked fine. I am using Unity 5.6.1f1 $$anonymous$$any thanks! @Aug$$anonymous$$ac
Yestoday it worked, however today it does not work.
When building it will generate two Android$$anonymous$$anifests, which contain some conflicts
Loading library manifest C:\Users\kaennkyou\Documents\VuforiaGear002\Temp\StagingArea\android-libraries\gvr\Android$$anonymous$$anifest.xml Loading library manifest C:\Users\kaennkyou\Documents\VuforiaGear002\Temp\StagingArea\android-libraries\unitygvr\Android$$anonymous$$anifest.xml $$anonymous$$erging main manifest Temp\StagingArea\Android$$anonymous$$anifest-main.xml $$anonymous$$erging library manifest C:\Users\kaennkyou\Documents\VuforiaGear002\Temp\StagingArea\android-libraries\gvr\Android$$anonymous$$anifest.xml $$anonymous$$erging manifest with lower Android$$anonymous$$anifest.xml:2:1-4:12 $$anonymous$$erging uses-sdk with lower Android$$anonymous$$anifest.xml:3:5-73 C:\Users\kaennkyou\Documents\VuforiaGear002\Temp\StagingArea\Android$$anonymous$$anifest-main.xml:3:3-72 Error: uses-sdk:$$anonymous$$SdkVersion 14 cannot be smaller than version 16 declared in library C:\Users\kaennkyou\Documents\VuforiaGear002\Temp\StagingArea\android-libraries\gvr\Android$$anonymous$$anifest.xml $$anonymous$$gestion: use tools:overrideLibrary="com.google.vr.cardboard" to force usage
@Aug$$anonymous$$ac I have encountered this problem recently and your answer came up. $$anonymous$$ay I ask what AD$$anonymous$$ is?
Answer by hixiaohe · Jun 03, 2017 at 11:05 AM
I fixed it by deleting Assets\Plugins\Android\AndroidManifest.xml
Answer by Bentoon · Sep 07, 2017 at 05:49 PM
Hello @AugMac, @hixiaohe Still doesnt work for me, alas.
I'm 2017.1
everything else is updated & new project started / the Android Manifest file just keeps recreating itself when I delete it
still: D:\U3D\M2VR\Temp\StagingArea\AndroidManifest-main.xml:4:16-57 Error: Attribute application@theme value=(@style/UnityThemeSelector) from AndroidManifest-main.xml:4:16-57 is also present at AndroidManifest.xml:3:83-147 value=(@android:style/Theme.Black.NoTitleBar.Fullscreen). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest-main.xml:4:3-12:17 to override.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Answer by ThaiSon84 · Sep 10, 2017 at 01:27 AM
I fix it (v2017.0f3)
1) just open https://developer.android.com/studio/index.html
2) scroll down to the bottom of that page
3) go to downloads
4) scroll down to the bottom of that page
5) find Windows "tools_r25.2.3-windows.zip" download and unzip it
5) find MacOSX "tools_r25.2.3-macosx.zip" download and unzip it.
6) In the SDK path replace the tools folder.
didnt find this file. can you help a little more please ?
do mean this file: https://androidsdkoffline.blogspot.co.il/p/android-sdk-tools.html
Your answer
Follow this Question
Related Questions
Android build problem 0 Answers
Unity Remote 5 Not Connecting 3 Answers
App Runs fine after "Build and Run" but freezes when installed from APK 0 Answers
Unity detect wrong androidSDK version 0 Answers
Can anyone help me figure out this android build error? 0 Answers