上传到Google Play时AAPT错误(aapt error when uploading to

2019-10-20 15:05发布

我收到以下错误,而试图我APK上传到Alpha版测试:

 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

我看过很多类似的问题,并似乎没有帮助。 我仍然无法找到问题的所在。

这里是我的manifest.xml文件:

<?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>

我也运行在本地的聘任命令。 而我得到同样的错误在最后。

Answer 1:

您的<intent-filter>的行动必须是字符串文字。 您不能指定字符串资源。



文章来源: aapt error when uploading to google play