question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Your 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

  1. cordova create …
  2. cordova plugin add cordova-plugin-background-geolocation
  3. cordova platform add android@latest
  4. 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:37

github_iconTop GitHub Comments

49reactions
sonicwongcommented, Jul 2, 2019

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" />

11reactions
baversjocommented, Feb 28, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found