Search code examples
androidnativescript

Nativescript build failed


I'm trying to get my app on an android device. When I run

tns run android

I get this error :

/Users/coreelements/Projects/nativescript/myapp/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:32: AAPT: error: resource
drawable/icon (aka nl.coreelements.myapp:drawable/icon) not found.FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:processDebugResources'.

  Failed to process resources, see aapt output above for details.

I've already tried regenerating the app and splashes :

tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png

What am I missing? I've also tried to buid/run in App Studio.


Solution

  • Just wrapping up the answer from @fransyozef:

    App_Resources/Android/src/main/AndroidManifest.xml should point to the right drawable, in this case replacing android:icon="@drawable/icon" with android:icon="@drawable/appicon" solved the issue.