上传到谷歌播放时出错:android:label属性:属性不是字符串值

时间:2015-06-29 14:31:05

标签: java android xml google-play android-manifest

我试图将我的新apk上传到Google Play服务,它说当前的错误消息:

Your APK cannot be analyzed using aapt. Error output:
Failed to run aapt dump badging:
ERROR getting 'android:label' attribute:attribute is not a string value

我试图在网上搜索此错误,本教程(ERROR getting 'android:label' attribute: attribute is not a string value)建议使用“aapt dump badging APKPATH”命令来查看错误是什么。这是我得到的: http://postimg.org/image/u8d0unohv/

我真的不知道怎么读这个。有人可以帮我识别错误吗?我的游戏有一个日语字符串的value-jp文件夹,这里是清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="br.ufrn.dimap.pairg.karutakanji.android"
    android:versionCode="7"
    android:versionName="0.1.12-beta" >

    <supports-screens
        android:largeScreens="true"
        android:normalScreens="false"
        android:smallScreens="false"
        android:xlargeScreens="true"
        android:requiresSmallestWidthDp="600" />

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="18" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <dependency>
        <groupId>javax.mail</groupId>

        <artifactId>mail</artifactId>
        <version>1.4.5</version>
    </dependency>
    <dependency>
        <groupId>javax.activation</groupId>

        <artifactId>activation</artifactId>

        <version>1.1.1</version>
    </dependency>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/tituloDoApp"
        android:theme="@style/AppTheme" >
        <meta-data
            android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity
            android:name="com.karutakanji.EscolherCategoriasModoTreinamento"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.MainActivity"
            android:label="@string/tituloDoApp"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.karutakanji.ModoCasual"
            android:label="@string/title_activity_tela_inicial_multiplayer"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.ModoTreinamento"
            android:label="@string/title_activity_modo_treinamento"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.DadosPartidasAnteriores"
            android:label="@string/title_activity_dados_partidas_anteriores"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.MostrarDadosUmaPartida"
            android:label="@string/title_activity_mostrar_dados_uma_partida"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.LojinhaMaceteKanjiActivity"
            android:label="@string/title_activity_lojinha_macete_kanji"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.VerMaceteKanjiActivity"
            android:label="@string/title_activity_ver_macete_kanji"
            android:screenOrientation="portrait" >
        </activity>

        <service
            android:name="com.karutakanji.BackgroundSoundService"
            android:enabled="true" >
        </service>

        <activity
            android:name="com.karutakanji.MostrarRegrasModoTreinamento"
            android:label="@string/tituloDoApp"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.Configuracoes"
            android:label="@string/title_activity_configuracoes"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.EscolherFormaDeJogoTreinamento"
            android:label="@string/title_activity_escolher_forma_de_jogo_treinamento"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.ModoCompeticao"
            android:label="@string/title_activity_modo_competicao"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.RankingCompeticao"
            android:label="@string/title_activity_ranking_competicao"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.EsqueceuSenha"
            android:label="@string/title_activity_esqueceu_senha"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.karutakanji.MostrarPalavrasUmaPartida"
            android:label="@string/title_activity_mostrar_palavras_uma_partida"
            android:screenOrientation="portrait" >
        </activity>
    </application>

</manifest>

2 个答案:

答案 0 :(得分:1)

看起来你的某些标签不合适。确保遵循可以找到Here的正确结构。查看Manifest page似乎“依赖”标签不是有效的,因为它不在“可以包含”列表中。

答案 1 :(得分:0)

我找到了答案。只需按照我给出的链接,使用命令aapt dump badging APKPATH,您将收到一个关于错误的id号。在项目的R.java存档上搜索(ctrl + f)并在那里找到一个组件。我的错误是:在strings.xml上,这个带有此id的组件不存在!我一定是误删了^^