4
\$\begingroup\$

When I try to export my Unity game to Android, I get this error:

CommandInvokationFailure: Failed to re-package resources. See the Console for details.

AndroidManifest.xml:4: error: No resource identifier found for attribute 'isGame' in package 'android'

AndroidManifest.xml:4: error: No resource identifier found for attribute 'banner' in package 'android'

What could cause this?

\$\endgroup\$
1
  • 4
    \$\begingroup\$ When I get build errors I usually start by googling the exact error message. For example, searching No resource identifier found for attribute 'isGame' returns answers.unity3d.com/questions/914949/… \$\endgroup\$
    – jhocking
    Commented Mar 26, 2015 at 16:43

2 Answers 2

1
\$\begingroup\$

The reported error commonly derives from not having your Android SDK up to date. This has been confirmed at Unity Answers and Stack Overflow.

Updating your Android SDK to at least API level 21 (also known as Lollipop) should fix your problem. Regardless, it is a good idea to ensure you have the latest version of the Android SDK.

Further confirmation at Unity Answers implies that Unity should have detected this problem, and automatically attempted to upgrade your SDK. The fact that it does not implies the presence of a bug, which you may consider reporting


Contrary to the other answer, you do not need to specifically target the API, in your build. isGame and banner are both members of the application declaration. The application declaration has an API requirement of API Level 1 - it has always been there.

As such, versions that pre-date Lollipop will not freak out over newer inclusions; they just wont use them.

\$\endgroup\$
0
0
\$\begingroup\$

You need to build against API level 21 or higher. If using Ant, then edit project.properties and use:

target=android-21
\$\endgroup\$
2
  • \$\begingroup\$ In contrast to building against API 21, You should only need to have the API 21 SDK installed. \$\endgroup\$
    – Gnemlock
    Commented Jan 23, 2017 at 0:41
  • \$\begingroup\$ This answer still works (you have to have the SDK installed to build against it); but it implies an unnecessary restriction on users that follow it. \$\endgroup\$
    – Gnemlock
    Commented Jan 23, 2017 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .