上传到Google Play时AAPT错误 [英] aapt error when uploading to google play

查看:453
本文介绍了上传到Google Play时AAPT错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误,同时试图上传我的apk到alpha测试:

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.

下面是我的manifest.xml文件:

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.

推荐答案

&LT;意向滤光器&gt; 的行动必须是字符串文字。您不能指定字符串资源。

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

这篇关于上传到Google Play时AAPT错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆