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

\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

\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?

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

I fixed it by deleting Assets\Plugins\Android\AndroidManifest.xml

worked here as well, many thanks!

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)

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

  6. find MacOSX “tools_r25.2.3-macosx.zip” download and unzip it.

  7. In the SDK path replace the tools folder.

Just delete the “android:theme=”@style/UnityThemeSelector"" from the Android Plugins Folder