Home > database >  Failed to link Android resources on real device
Failed to link Android resources on real device

Time:07-04

I specified an icon in AndroidManifest.xml and everything works fine on the emulator, but when I try to run it on a real device I get an error -

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:/home/daniil/StudioProjects/postterminal/build/app/intermediates/packaged_manifests/debug/AndroidManifest.xml:33: AAPT: error: resource mipmap/app_icon (aka com.example.postterminal:mipmap/app_icon) not found.

here is my /home/daniil/StudioProjects/postterminal/build/app/intermediates/packaged_manifests/debug/AndroidManifest.xml - this

and here is my proj/android/app/src/main -

<activity 
            android:icon="@mipmap/app_icon"....
</activity>

Tell me what is my mistake and how to fix it?

piece of code where I use the icon -

final AndroidInitializationSettings initializationSettingsAndroid = AndroidInitializationSettings('app_icon');

CodePudding user response:

you added this in drawable24 ,

you need to add drawable folder

  • Related