Aapt dumb badging错误

问题描述 投票:-5回答:2

当我尝试上传签名的应用程序时。 Play商店显示android manifest.xml.343错误获取'android:label'值引用不存在。我逐行检查了AndroidManifest.xml和Strings,但不幸的是我没弄明白。

用于在本地模拟相同的错误。我运行“./aapt dump badging myapp.apk”它显示相同的错误。

enter image description here

清单文件

<application
    android:name=".MainApplication"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:largeHeap="true"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    tools:replace="android:name,android:theme">

    <activity
        android:name=".settings.ui.MainBoardActivity"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@style/masterapp_core_theme.NoActionBar" />

    <activity
        android:name=".settings.ui.MASplashScreenActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Translucent.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" 
         />
        </intent-filter>
    </activity>
   .........
</application>
android aapt
2个回答
1
投票

<application>标签内添加以下行

 android:label="@string/app_name"

0
投票

两天后,我弄清楚如何解决问题。首先,我找到了sdk / build-tools目录下的appt工具。当我运行appt dump badging myapp.apk时,我看到label属性值为空。但问题是我已经定义了它。为了确保我输入了硬编码值而没有像这样引用@ string / name。但它没有解决。

最后我比较了上个月的变化,所以问题是我在项目的另一个模块的string.xml(tr)上定义了字符串值,但是我没有在默认的string.xml上定义它。所以aapt无法在默认情况下找到引用:)

© www.soinside.com 2019 - 2024. All rights reserved.