Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Icon error building Cordova

Using cordova build on a one-year-old project raises:

:processDebugResources
my_project/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:24: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

And then crushes:

FAILURE: Build failed with an exception.

Any idea?

like image 647
Michael Avatar asked Jan 18 '16 17:01

Michael


3 Answers

I got the same problem and I solved this by re generating icon paths, try this

ionic resources --icon

after this use below command

ionic build
like image 181
Amitabh Sarkar Avatar answered Oct 21 '22 09:10

Amitabh Sarkar


In your manifest, does it have:

    android:icon="@drawable/ic_launcher"

If so, you can try switching it to:

    android:icon="@mipmap/ic_launcher"

It seems that @drawable has been superseded by @minimap. More info can be found here and here. Hope this helps.

like image 39
Chewpers Avatar answered Oct 21 '22 08:10

Chewpers


There is debug option -d in the cli run the below command to check what is the problem,

cordova -d --stacktrace build android
like image 1
Renjith Thankachan Avatar answered Oct 21 '22 09:10

Renjith Thankachan