0

I've a issue to generate a signed apk.

I have these errors

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').

My strings.xml contains:

<?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>

And in my AndroidManifest.xml, the line with the @drawable/icon is:

<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">

And you can see, i've the right file in the right folder...

enter image description here

How can I fix these errors?

EDIT

Now i've two error alert:

Error: /Applications/MAMP/htdocs/Cordova/ABC/out/production/ABC/ABC.apk (No such file or directory)

and

Error: Cannot run program "/Users/John/Library/Android/sdk/tools/zipalign": error=13, Permission denied
Poorman
  • 205
  • 4
  • 17

1 Answers1

0

Remove "@string" from string.xml and it will work fine.

android:label="@string/app_name" -> android:label="app_name"

@drawable/icon for ref : mipmap drawables for icons

Community
  • 1
  • 1
Anil Meenugu
  • 1,411
  • 1
  • 11
  • 16