error: failed linking file resources ...platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka xxx.xxx:mipmap/icon) not found.
See original GitHub issueYour Environment
- Plugin version: 3.0.0-alpha.50
- Platform: Android
- OS version: Android 9
- Device manufacturer and model: OnePlus A3000 (oneplus 3t)
- Running in Simulator:
- Cordova version (
cordova -v
): 8.1.2 (cordova-lib@8.1.1) - Cordova platform version (
cordova platform ls
): android 8.0.0 - Plugin configuration options:
- Link to your project:
Context
- What went wrong: Execution failed for task ‘:app:processDebugResources’.
Android resource linking failed …platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka xx.xxx:mipmap/icon) not found.
error: failed linking file resources.
Expected Behavior
BUILD SUCCESS
Actual Behavior
BUILD FAILED
Possible Fix
Steps to Reproduce
- cordova create …
- cordova plugin add cordova-plugin-background-geolocation
- cordova platform add android@latest
- cordova run
Context
BUILD FAILING
Debug logs
This is line 2 of the file authenticator.xml
account-authenticator android:accountType=“@string/mauron85_bgloc_account_type” android:icon=“@mipmap/icon” android:label=“@string/app_name” android:smallIcon=“@mipmap/icon” xmlns:android=“http://schemas.android.com/apk/res/android”
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:37
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just add below line to config.xml (inside
<platform name="android">
tag) This will reuse the pre-generated icon.<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="app/src/main/res/mipmap/icon.png" />
On newer API versions, you need to set SMALL_ICON and ICON to
@mipmap/ic_launcher
in both package.json and config.xml After that I had to recreate the android platform for it to “take”.cordova platform remove android && cordova platform add android
.