Android - 无法运行aapt转储标记:'android:icon'属性:属性值引用不存在

问题描述 投票:0回答:1

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

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

这是一个非常简单的应用程序,这里是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:

<?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商店时。

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

android apk aapt android-icons
1个回答
-1
投票

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

我假设这个问题可能适用于依赖于本地化/语言的所有类型的资源。

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