androidandroid-manifestaapt2android-mipmaplauncher-icon

AndroidManifest.xml:3: error: resource mipmap/launcher_icon (aka com.xyz.dbdb:mipmap/launcher_icon) not found


In the process of generating a .aab file for Google Play Store am trying to run the following command as a part of the process:

aapt2.exe link --proto-format -o base.zip -I android.jar --manifest decompile_apk\AndroidManifest.xml

And at the end of processing I get these errors:

decompile_apk\AndroidManifest.xml:3: error: resource mipmap/launcher_icon (aka com.xyz.dbdb:mipmap/launcher_icon) not found.
decompile_apk\AndroidManifest.xml:4: error: resource style/LaunchTheme (aka com.xyz.dbdb:style/LaunchTheme) not found.
decompile_apk\AndroidManifest.xml:5: error: resource style/NormalTheme (aka com.xyz.dbdb:style/NormalTheme) not found.
error: failed processing manifest.

Files that I have are as follows

D:\myproject\android\app\src\main\res\drawable\launch_background.xml
D:\myproject\android\app\src\main\res\drawable-v21\launch_background.xml
D:\myproject\android\app\src\main\res\mipmap-hdpi\launcher_icon.png
D:\myproject\android\app\src\main\res\mipmap-mdpi\launcher_icon.png
D:\myproject\android\app\src\main\res\mipmap-xhdpi\launcher_icon.png
D:\myproject\android\app\src\main\res\mipmap-xxhdpi\launcher_icon.png
D:\myproject\android\app\src\main\res\mipmap-xxxhdpi\launcher_icon.png
D:\myproject\android\app\src\main\res\values\styles.xml
D:\myproject\android\app\src\main\res\values-night\styles.xml

My AndroidManifest.xml is as follows:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:label="DBDB"
        android:name="${applicationName}"
        android:icon="@mipmap/launcher_icon">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>

Any clue how to resolve these issues:


Solution

  • After a lot of wrangling with various option and not receiving any answer here I shifted my project from Visual Code to Android Studio. Recompile the project there. Signed the AAB and uploaded to Google Play Store successfully.