Log in or register to post comments

Unable to merge android manifest

June 21, 2017 - 12:56am #1

Hello ! 

So when I try to build my application, Unity shows me this error message:

 

Attribute application@icon value=(@drawable/app_icon) from AndroidManifest-main.xml:10:16-49

is also present at AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).

Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest-main.xml:10:3-31:17 to override.

 

 

But when I change in the android manifest, I try to build again and the manifest returns as before, without the tools:replace.

 

I tried to fix the problem by removing the android Manifest in the project folder (except the hand) but it still does not work.

Can you help me ?? :(

Unable to merge android manifest

June 29, 2017 - 2:49am #2

I am also having issues with building for Android, and I am getting the same errors in that Unity is telling me that it couldn't merge the manifest files.

I've made sure that I have the appropriate SDK installed through the Android Studio program, and made sure to set my Android target API level to level 22 and changed the minimum to 19 in the manifest

I am getting two console errors:

 

F:\Local Unity\Vuforia\Temp\StagingArea\AndroidManifest-main.xml:10:83-141 Error: Attribute application@theme value=(@android:style/Theme.NoTitleBar.Fullscreen) from AndroidManifest-main.xml:10:83-141 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:10:3-31:17 to override. UnityEditor.HostView:OnGUI()

 

AndroidSDKToolsException: Unable to merge android manifests. See the Console for more details. UnityEditor.Android.AndroidSDKTools.DetectErrorsAndWarnings (System.String logMessages, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.MergeManifests (System.String target, System.String mainManifest, System.String[] libraryManifests, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit) UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.MergeManifests (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String targetManifest, System.String mainManifest) UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.HostView:OnGUI()

 

I have the AndroidManifest file in my Assets/Plugins folder in my Unity project file, the one that you get from importing the vurforia unity package.

I've noticed that Unity is creating another manifest in the Temp/StagingArea called "AndroidManifest-main.xml. Is this normal? Anyway, within that file I see the following  

<!--?xml version="1.0" encoding="utf-8"?--><manifest android:installlocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versioncode="1" android:versionname="1.0" package="com.TestCompany.Vuforia" xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minsdkversion="19" android:targetsdkversion="22"> <uses-feature android:name="android.hardware.camera"> <supports-screens android:anydensity="true" android:largescreens="true" android:normalscreens="true" android:smallscreens="true" android:xlargescreens="true"> <uses-permission android:name="android.permission.INTERNET"> <uses-permission android:name="android.permission.CAMERA"> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"> <application android:debuggable="false" android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> <activity android:label="@string/app_name" android:name="com.unity3d.player.UnityPlayerNativeActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"> <category android:name="android.intent.category.LAUNCHER"> </category></action></intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true"> <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false"> </meta-data></meta-data></activity> <activity android:configchanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:label="@string/app_name" android:name="com.unity3d.player.VideoPlayer" android:screenorientation="portrait"> </activity> <!--
            To support devices using the TI S3D library for stereo mode we must 
            add the following library.
            Devices that require this are: ODG X6 
        --><uses-library android:name="com.ti.s3d" android:required="false"> <!--
            To support the ODG R7 in stereo mode we must add the following library.
        --><uses-library android:name="com.osterhoutgroup.api.ext" android:required="false"> </uses-library></uses-library></application> </uses-permission></uses-permission></uses-permission></uses-permission></supports-screens></uses-feature></uses-sdk></manifest> <!-- android:installLocation="preferExternal" -->

 

Log in or register to post comments