20

I got the following error while build apk file from unity on mac osx sierra. this also build fine before I reboot my macbook, but not now.

I've added error details below:

Note: I'm using facebook sdk.

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, 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()

last

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83 
UnityEditor.HostView:OnGUI()
Programmer
  • 121,791
  • 22
  • 236
  • 328
Muhammet Demir
  • 1,995
  • 5
  • 21
  • 42
  • Post the whole error which contains the reason for the merge error. What you have now is simply a tiny part of the error. Also explain which plugins you are using. – Programmer Aug 04 '17 at 22:34
  • I added more details. – Muhammet Demir Aug 04 '17 at 22:39
  • 1
    Find "AndroidManifest.xml" provided by facebook or the plugins you are using located in your project then modify them like mentioned [here](http://answers.unity3d.com/questions/1355793/error-while-saving-blame-file.html) – Programmer Aug 04 '17 at 22:49
  • Thanks! answer the question to choose as correct – Muhammet Demir Aug 04 '17 at 23:14
  • 1
    I changed the title to the error message **reason** so that it can be found by other people having the-same problem. – Programmer Aug 04 '17 at 23:26

1 Answers1

49

Problem is usually caused by a plugin. Find AndroidManifest.xml from the plugin in your project, open it and then add xmlns:tools="http://schemas.android.com/tools" under <manifest xmlns:android="http://schemas.android.com/apk/res/android".

Save it and rebuilt again. This should solve the problem. You can see what it should like from this post.

Programmer
  • 121,791
  • 22
  • 236
  • 328