我正在尝试在Android设备上安装我的应用。当我运行
tns run android
我收到此错误:
/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.
我已经尝试过重新生成应用程序并启动:
tns resources generate icons src/images/appicon.png
tns resources generate splashes src/images/appicon.png
我想念什么?我还尝试在App Studio中构建/运行。
答案 0 :(得分:1)
只需总结@fransyozef的答案:
App_Resources/Android/src/main/AndroidManifest.xml
应该指向正确的可绘制对象,在这种情况下,用android:icon="@drawable/icon"
替换android:icon="@drawable/appicon"
就解决了这个问题。
答案 1 :(得分:0)
以上解决方案对我不起作用,起作用的是变化
android:icon="@drawable/icon"
至android:icon="@drawable/fileName"
,因此将/ icon替换为存储在其中的图像的/ fileName。