Search Issue Tracker
Won't Fix
Votes
0
Found in
5.5.4p1
Issue ID
924792
Regression
No
[Android] Unity fails merging Android manifest with sdk tools 26.0.2
Reproduction steps:
1) Download and open attached project
2) Press Build and run
-- Notice that build fails with errors:
Error: Error while saving blame file, build will continue
Error: The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound.
UnityEditor.HostView:OnGUI()
and
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, <...> (full error pasted in edit section)
Note: This reproduces only with 26.0.1 and 26.0.2 (currently newest) versions of sdk tools
Reproduced with:
2017.2.0b1, 2017.1.0f1, 5.6.1p2, 5.5.4p1, 5.4.5p3
RESOLUTION: WONTFIX. The issue is caused by a bug in the project. Specifically, Assets/Plugins/Android/AndroidManifest.xml is invalid and broken. The exact issue is that the manifest lacks xmlns:tools="http://schemas.android.com/tools" namespace declaration and thus the new manifest merger tool from 26.0.2 fails to merge it with another manifest (specifically support-v4-25.2.0.aar), which uses the tools XML namespace.
Comments (39)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Tags window completely breaks and throws Exception errors when Adding a Tag to a GameObject
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
sebt955
Jan 16, 2023 12:51
Unity has been reported to have issues merging Android manifests when using SDK Tools version 26.0.2. They recommend using SDK Tools version 25.2.5 instead.
Vikramsingh123
Aug 06, 2021 08:19
<a href="https://issuetracker.unity3d.com/">issue tracker on unity</a>
andrewjose
Apr 29, 2021 11:16
Hey, Thanks!
hollydearthe
Mar 11, 2021 07:53
Those manifest files are auto generated at compile time aren't they ? Doesn't seem like adding a line to the manifest files.
Robert-pro
Apr 19, 2018 08:37
ALEX-LUSHIKU , method work fine for me. this is my AndroidManifest wchich is working Fix All Problem of UNITY FAILS MERGING ANDROID
=============================================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
This Google Mobile Ads plugin library manifest will get merged with your
application's manifest, adding the necessary activity and permissions
required for displaying ads.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.admob.demo"
>
<!-- Google Mobile Ads Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<!-- Uncomment to add billing for in-app purchase ads -->
<!--<uses-permission android:name="com.android.vending.BILLING"/> -->
<application android:theme="@style/UnityThemeSelector"
android:icon="@drawable/app_icon"
android:label="@string/app_name" >
<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>
</activity>
</application>
</manifest>
yjaveri99
Apr 16, 2018 11:45
Same problem.Please help!!!
Alex-Lushiku
Jan 10, 2018 17:58
Go to your AndroidManifest.xml inside your plugin's folder (I used Unity Admob so it was at Assets/Plugins/Android) and paste `xmlns:tools="http://schemas.android.com/tools"` below `xmlns:android="http://schemas.android.com/apk/res/android`
donzaemon
Nov 24, 2017 06:45
Those manifest files are auto generated at compile time aren't they ? Doesn't seem like adding a line to the manifest files will do anything because they are regenerated .. ? Where do we find the source that is generating them ?
iluqmansharif
Nov 22, 2017 11:01
I did add xmlns:tools="http://schemas.android.com/tools" in that AndroidManifest file as per you said above but it still didn't solve my issue. I don't see why :/
ToyBrain101
Oct 21, 2017 03:38
I can't get around this. it is a nightmare! can anyone help me please?