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.

Mipmap/icon not found

See original GitHub issue

Environment:

  • Plugin version: “3.0.0-alpha.50”,
  • Platform: Android (Ionic 4)
  • OS version: 8.0+
  • Device manufacturer and model: any
  • Running in Simulator: No
  • Cordova version (cordova -v): 9.0.0 (cordova-lib@9.0.1)
  • Cordova platform version (cordova platform ls): android 8.0.0
  • Plugin configuration options: default
  • Link to your project: private

Context:

I get failure when I try to release the apk for publishing, I get the following error:

Expected Behavior

Compile without errors in cordova 9.0

Actual Behavior

I get failure for mipmap/icon not found.

Possible Fix

It’s happening because on latest cordova versions the icon isn’t compiled anymore for mipmap/icon.png but for mipmap/ic_launcher.png.

Steps to Reproduce

  1. Create an application using Ionic 4 (latest)
  2. Add this plugin to the application
  3. Run: ionic cordova build android --release

Debug logs

`

  • What went wrong: Execution failed for task ‘:app:processReleaseResources’.

Task :app:processReleaseResources FAILED 23 actionable tasks: 1 executed, 22 up-to-date Android resource linking failed C:\Projetos\utrack-app\platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka br.com.grupounicad.utrackv2:mipmap/icon) not found.

error: failed linking file resources.`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

6reactions
mightytyphooncommented, Jun 6, 2019

@n0minal Hi, I reopen this issue because your fix is just insanely time consuming.

For the app to work you need to change what is causing the problem (aka the mimap ressource)

So as you wrote it :

--variable ICON="@mipmap/ic_launcher" \
--variable SMALL_ICON="@mipmap/ic_launcher"
  1. The file to change is in : projectRoot/platforms/android/android.json

  2. Here find the line “res/xml/authenticator.xml”

  3. now change the @mipmap/icon for @mipmap/ic_launcher there (needs 2 modifications only in the xml object line)

change :

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

to :

"xml": "<account-authenticator android:accountType=\"@string/mauron85_bgloc_account_type\" android:icon=\"@mipmap/ic_launcher\" android:label=\"@string/app_name\" android:smallIcon=\"@mipmap/ic_launcher\" xmlns:android=\"http://schemas.android.com/apk/res/android\" />",

It should work, also this should be fixed in the plugin directly.

1reaction
inDivyanshucommented, Apr 30, 2019

It is same with me. Did you find any solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

authenticator.xml resource mipmap/icon not found #678 - GitHub
I updated cordova-android of 7.1.4 to 8.0.0 in ionic project. in browser work correctly with ionic serve but when build with ionic cordova ......
Read more >
resource mipmap/myicon not found. How to fix this?
Please add the icon picture to the resource folder and then set the icon. You could specify the application icon through the Android...
Read more >
How to fix an issue while build android app in ionic?
I've got an issue while use ionic cordova build android . How to fix " Execution failed for task ':app:processReleaseResources'. > Android ...
Read more >
How to solve 'No resource found that matches the given name ...
How do I solve "No resource found that matches the given name (at 'icon' with value '@mipmap/ico')" in Android Studio?
Read more >
mauron85/cordova-plugin-background-geolocation - Issuehunt
https://build.phonegap.com given build error "app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon ( myAppId:mipmap/icon) not found" #669.
Read more >

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