Android market publishing: 'android:icon' attribute: attribute is not a string value
Asked Answered
E

4

1

I'm trying to publish an app to the Android Market, I get the following error:

W/ResourceType(16964): No known package when getting value for resource number 0x01030006 ERROR getting 'android:icon' attribute: attribute is not a string value

Here is the AndroidMannifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="it.prezzofelice.android"
    android:versionCode="6"
    android:versionName="1.0.05"
    >

    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" />

    <!-- Prezzofelice -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- C2DM -->
    <permission android:name="it.prezzofelice.android.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="it.prezzofelice.android.permission.C2D_MESSAGE" />    
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <!-- Flurry -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@android:style/Theme.NoTitleBar"
        android:theme="@style/AppTheme"
        android:name=".MainApplication"
        >

        <uses-library android:name="com.google.android.maps" />

        <activity
            android:name=".SplashActivity"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:launchMode="singleInstance"
            android:label="@string/app_name"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".MainActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".deals.DealsListActivity"
            android:theme="@style/AppTheme"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name"
            />

        <activity
            android:name=".deals.DealDetailsActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".deals.CityListActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".deals.BuyActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".coupons.CouponListActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".profile.ProfileActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".deals.DealMapActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".profile.LoginRegisterActivity"
            android:theme="@style/AppTheme"
            android:launchMode="singleTop"
            android:label="@string/app_name"
            />

        <activity
            android:name=".profile.LoginActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".profile.RegisterActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <activity
            android:name=".coupons.CouponDetailsActivity"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            />

        <service
            android:name=".BrowserService"
            />

        <receiver
            android:name=".c2dm.C2DMBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND"
            >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="it.prezzofelice.android" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="it.prezzofelice.android" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>            
        </receiver>

    </application>

</manifest>

I already tried both these methods with no luck:

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

  • I have defined a values/strings.xml with the "app_name" string.

  • I have created a "drawable" folder with ic_launcher.png copied from drawable-hdpi

Any hint?

Thanks, regards Maurizio

Evora answered 4/5, 2012 at 15:43 Comment(1)
Why are you asking 2 times for the permissions internet, coarse location and fine location? One time is enough.Neogaea
N
2

I would try to clean the project and build a new apk.

In Eclipse: Click Project > Clean.. > Select your project and click Ok

I don't know why you are putting a style into the android:label attribute in the application tag. As far as I know this should be @string/app_name.

Neogaea answered 4/5, 2012 at 16:3 Comment(2)
the error was related to the "android:label" even if telling me about "android:icon"!!!! thanks!Evora
I just checked your manifest, some problems are related to other attributes in the same tag. It's the secret of XML.Neogaea
M
1

I had the same problem for another reason.

In fact, I had set some values to null like this

<activity
    android:name=".MyActivity_"
    android:label="@null"
    android:launchMode="singleTask"
    android:screenOrientation="portrait" >
</activity>

And I fixed the problem to replace all "@null" to "".

<activity
    android:name=".MyActivity_"
    android:label=""
    android:launchMode="singleTask"
    android:screenOrientation="portrait" >
</activity>

The application behavior is the same but in first case, we can publish and in second case, we can't

Mexicali answered 25/10, 2013 at 8:27 Comment(0)
B
1

use drawable instead mipmap, don't know why.

<application
        android:name="com.txxx.eApplication"
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
Bodily answered 27/3, 2020 at 8:27 Comment(0)
C
0

Is your application localized in multiple languages? If so, then you need to make sure that you have correctly defined your strings in the default res/strings.xml file.

Cleaning/restarting eclipse sometimes does the trick too, as mentioned above :)

Cardoon answered 4/5, 2012 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.