aapt error when uploading to google play

橙三吉。 提交于 2020-01-05 12:09:16

问题


I'm getting the following error while trying to upload my apk to alpha testing:

 Upload failed

 Your APK cannot be analyzed using 'aapt dump badging'. Error output:

 Failed to run aapt dump badging:
 ERROR getting 'android:name' attribute: attribute is not a string value

I've looked at many similar questions and none seemed to help. I still couldn't find where the problem is.

Here is my manifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tomklino.imhere"
android:versionCode="1"
android:versionName="1.0" >

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

<uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="19" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <receiver android:enabled="true"
        android:exported="false"
        android:name="com.tomklino.imhere.Pinger" >
        <intent-filter>
            <action android:name="@string/intent_action_ping_states" />
        </intent-filter>
    </receiver>
    <receiver android:enabled="true"
        android:exported="false"
        android:name="com.tomklino.imhere.IsHereLooper" >
        <intent-filter>
            <action android:name="@string/intent_action_start_the_clock" />
        </intent-filter>
    </receiver>
    <activity
        android:name="com.tomklino.imhere.MainActivity"
        android:label="@string/app_name"
        android:theme="@style/Theme.AppCompat.Light" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.tomklino.imhere.LoginActivity"
        android:label="@string/title_activity_login"
        android:parentActivityName="com.tomklino.imhere.MainActivity"
        android:windowSoftInputMode="adjustResize|stateVisible" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.imhere.MainActivity" />
    </activity>

    <service
        android:name="com.tomklino.imhere.Communicator"
        android:enabled="true"
        android:exported="true" >
        <intent-filter>
            <action android:name="@string/intent_action_ping_states" />
        </intent-filter>
    </service>

    <activity
        android:name="com.tomklino.imhere.SearchLocations"
        android:label="@string/title_activity_search_locations" >
    </activity>
    <activity
        android:name="com.tomklino.imhere.MyLocations"
        android:label="@string/title_activity_my_locations" >
    </activity>
</application>

I've also run the appt command locally. And I'm getting the same error at the end.


回答1:


Your <intent-filter> actions have to be String literals. You cannot specify String resources.



来源:https://stackoverflow.com/questions/25173293/aapt-error-when-uploading-to-google-play

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!