我有一个问题就是生成一个签名的apk。
我有这些错误
Error:(5, -1) Android Resource Packaging: [...] /Applications/MAMP/htdocs/Cordova/[...]/platforms/android/AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
Error:(5, -1) Android Resource Packaging: [...] /Applications/MAMP/htdocs/Cordova/[...]/platforms/android/AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(6, -1) Android Resource Packaging: [...] /Applications/MAMP/htdocs/Cordova/[...]/platforms/android/AndroidManifest.xml:6: error: Error: No resource found that matches the given name (at 'label' with value '@string/activity_name').
我的strings.xml包含:
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">app</string>
<string name="launcher_name">@string/app_name</string>
<string name="activity_name">@string/launcher_name</string>
</resources>
在我的AndroidManifest.xml中,带有@ drawable / icon的行是:
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
你可以看到,我在正确的文件夹中找到了正确的文件......
如何修复这些错误?
修改
现在我有两个错误警告:
Error: /Applications/MAMP/htdocs/Cordova/ABC/out/production/ABC/ABC.apk (No such file or directory)
和
Error: Cannot run program "/Users/John/Library/Android/sdk/tools/zipalign": error=13, Permission denied
答案 0 :(得分:0)
删除&#34; @ string&#34;来自string.xml,它可以正常工作。
机器人:标签=&#34; @串/ APP_NAME&#34; - &GT;机器人:标签=&#34; APP_NAME&#34;
@ drawable / icon for ref: mipmap drawables for icons