Android - 无法运行 aapt 转储标记:'android:icon' 属性:属性值引用不存在 [英] Android - Failed to run aapt dump badging: 'android:icon' attribute: attribute value reference does not exist

查看:24
本文介绍了Android - 无法运行 aapt 转储标记:'android:icon' 属性:属性值引用不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将我的 APK 上传到 Play 商店,但它一直显示此错误:

I have been trying to upload my APK to Play Store, but it keeps showing me this error:

无法运行 aapt dump 标记:AndroidManifest.xml:31: 错误:错误获取android:icon"属性:属性值引用不存在

Failed to run aapt dump badging: AndroidManifest.xml:31: error: ERROR getting 'android:icon' attribute: attribute value reference does not exist

这是一个非常简单的应用程序,这是清单:

It is a very simple app, here is the Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mx.com.hearwego.mexicocityaudioguideapp">

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

    <application
        android:allowBackup="true"
        android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        >
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity
            android:name=".MapsActivity"
            android:label="@string/title_activity_maps" />
        <activity
            android:name=".PoiDetailActivity"
            android:label="@string/title_activity_poi_detail"
            android:theme="@style/AppTheme.NoActionBar" />
    </application>

</manifest>

这是@mipmap/ic_launcher:

And here is the @mipmap/ic_launcher:

<?xml version="1.0" encoding="utf-8"?>
    <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
        <background android:drawable="@drawable/ic_launcher_background"/>
        <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
    </adaptive-icon>

当我运行应用程序时,它工作正常,我仍然可以完美地看到图标.此外,当我签署 APK 时,APK 也能正常工作.问题出在上传到 Play 商店时.

When I run the app, it works fine, I still can see the icon perfectly. Also when I sign the APK, the APK works fine too. The problem is while uploading to Play Store.

有人可以帮我解决这个问题吗?

Can someone please help me solve this issue?

推荐答案

我在一个应用程序中收到了完全相同的消息,问题是在应用程序的非默认 strings.xml 中添加了一些字符串,我解决了只需将该资源添加到我的应用程序中的所有 strings.xml 即可.

I haved the same exact message in one app, and the problem was that some string was added to the non-default strings.xml in the app, I solved by just simply adding that resource to all the strings.xml in my app.

我认为这个问题可能适用于所有依赖本地化/语言的资源.

I assume that maybe this problem apply to all kind of resources that depends on localization/language.

这篇关于Android - 无法运行 aapt 转储标记:'android:icon' 属性:属性值引用不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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