Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ERROR getting 'android:icon' attribute: attribute is not a string value" when trying to upload to the Android Market

There's not a similar question here, but Googling around some other people have had the same issue. None of the recommended fixes are working.

The full error is:

The file is invalid: W/ResourceType(32055): Failure getting entry for 0x7f050001 (t=4 e=1) in package 0 (error -75) ERROR getting 'android:icon' attribute is not a string value

Here's my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.dominoes"
      android:versionCode="10"
      android:versionName="2.00">
    <application android:icon="@drawable/myicon" android:label="@string/app_name">
        <activity android:name=".Dominoes"
                  android:screenOrientation="landscape"
                  android:configChanges="orientation|keyboardHidden" 
                  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>
        <uses-sdk android:minSdkVersion="3" 
            android:targetSdkVersion="4" />
            <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="false" />  
</manifest> 

The image, "myicon.png", is located in the res/drawable folder. It's a 96x96 .png.

like image 481
polyclef Avatar asked Sep 19 '11 16:09

polyclef


2 Answers

Well, after screwing with this stupid bug for a couple of hours, I found the answer on my own. This is one of my few apps that is localized into Spanish, so my res directory had the following:

res/values-en

res/values-es

This apparently worked fine in previous versions of the Android Market. I think the last time I updated this app was over a year ago.

Anyway, turns out I needed just a plain values directory:

res/values

res/values-en

res/values-es

I just copied the contents of the values-en directory into the values directory and now the Android Market is happy and let me upload my .apk. I hadn't seen this particular answer in any of the research I came across, so hopefully this helps someone.

like image 59
polyclef Avatar answered Sep 26 '22 10:09

polyclef


You have to put the icon used in your main drawable folder. You don't have to delete the icons from the other folders, leave them with the different sizes of icons but put at least one of them in the drawable.

like image 35
AdolfoFermo Avatar answered Sep 24 '22 10:09

AdolfoFermo