Android 4.x build with Unity 5.x not working

Hi all,

I’m having a strange issue here:
I was compiling my project without any problems on Unity 4.x (incl. latest 4.6) with Android API 15 and it was running perfectly fine on a Android 4.0.4 phone and emulators. But after I upgraded to Unity 5.0.1 I couldn’t even build any more. The compiler error was the following:
“AndroidManifest.xml:4: error: No resource identifier found for attribute ‘isGame’ in package ‘android’”. And it was stating the same for the “isBanner” attribute.

I know that there is already an answer on this in

But unfortunately this does not solve my issue, because after following the solution there and installing Android API 21 I can build my project again without any compiler errors, but it is not running anymore neither on my Android 4.0.3 device nor on the 4.0.3 Android emulator. The game is terminating right after the startup on both.

It seems that Unity 5.x is creating a different AndroidManifest.xml, which now has two new elements: “android:isGame” and “android:banner”. From what I got, these parameter were introduced with Android 5.x, which would explain, why an older API version (e.g. 15) has issues with them and API 21 compiles just fine. It seems that Unity 5.x is creating the AndroidManifest.xml always with this new parameters independent from the target API version set in the project’s player settings! I guess that’s why other people suggest, that one should get API 21 and it will work.

I’m assuming that this parameters in the AndroidManifest.xml are not backwards-compatible, which means that an app compiled with API 21 and these parameter does not work on Android 4.x, or Android <5.x in general! And it seems that this is the case, but I couldn’t prove that up to now.

This is what I’ve already tried:

  • “adb logcat” didn’t show up anything really suspisious to me (or I just didn’t see it)
  • I’ve already upgraded Unity from 5.0.1 to 5.0.2, but it didn’t solve this
  • I tried to modify the AndroidManifest.xml by placing my own one (based on the generated one) without “isGame” and “banner” in “Assets/Plugins/Android” as supposed, but this does not work, since the generated AndroidManifest.xml is not replaced with mine, but instead mine is merged into the generated one. I also tried then to add comment characters in mine and hoping that they would be merged into the generated one and thus commenting out the parameters in the generated one, but this does also not work. The generated “application” node stays as it is and my `` is attached at the end.
  • I’ve also tried to modify the AndroidManifest.xml in the APK file build with API 21 and remove the parameters there as post-processing, but I didn’t manage to re-package the APK up to now, since it is failing on the installing process. But honestly this is just a fancy workaround and would just prove the backwards-incompatibility of “isGame” and “banner” and I don’t want to constantly post-process my APKs.

I haven’t updated to Unity 5.1, but honestly I don’t have much hope that this would solve anything.

Some questions now:

  • Is anyone else having this issue?
  • Or am I the only one still targetting an older Android version with latest Unity??? Since I haven’t found any other posts on this …
  • How is this supposed to work from Unity side?
  • Why is Unity 5.x always generating an AndroidManifest.xml based on latest Android and thus making it backwards-incompatible?
  • Am I missing something?

Thanks in advance. Any help is much appreciated.

I am using Unity 5 , and target API 14(android 4.0) for android devices.and it is working properly.
Yes I needed to Install android API 21 and update SDK tools and build tools.these stuffs seem to be prerequisite.

But After That, I successfully built an apk targeting Android API 14 and ran it on a device with same android version(4.0).

So it is not an issue and you dont have to edit AndroidManifest.xml not at all!

The game termination has Another reason that you need to find it.