Unable to merge android manifests in Unity3D

Sometimes when you are trying to build an Android app using Unity3D you’ll be using multiple plugins to help you achieve what you want; for example the Facebook Plugin and a Google Play Services plugin.
If you play your game in the editor, you’ll usually have no problem, but when you try to build you might get the dreaded Unable to merge android manifests.

Screen Shot 2016-02-15 at 8.44.23 pm

This is an absolute pain, because it’s cryptic, ugly, and down right frustrating. So, what could the problem be?

When Unity3D builds an Android APK it merges Android Manifests from Unity and the plugins that you are using into a single manifest. However, if there is a conflict between any of them, say in the minimumSDK version, then the merge will fail. If you have a look through the errors in the console you may notice something like this:

Screen Shot 2016-02-15 at 8.44.48 pm

This is telling us that one of the plugins has a different minimum SDK version than the main app. This is a bit of a problem, but it’s easily fixed.
Go to File -> Build Settings, this will open up the Build Settings modal. Make sure Android is selected as the build target then click on Player Settings….

In the Player Settings inspection window open up the Other Settings section. Then change the Minimum API Level to which ever the greatest one in the error message is (e.g. if your app is set to use API Level 9, but the Facebook plugin is using Level 15, then you change the Minimum API level to be 15).


Rebuild your app again and it should work!

Leave a Reply