Android Question Icon Error - ic_launcher_round not found

DawningTruth

Active Member
Licensed User
I used this tool to create my icon:

Easy App Icon

As suggested by this post:

https://www.b4x.com/android/forum/threads/adaptive-icons-simple-instructions-and-tips.123843/

Everything went smoothly, but when I try and compile my app I get this error:

Error:
Linking resources    Error
AndroidManifest.xml:18: error: resource mipmap/ic_launcher_round (aka b4a.myapp:mipmap/ic_launcher_round) not found.
error: failed processing manifest.

These are the directories the app generates:

1681803048437.png


I checked through the directories and all of them except mipmap-ldpi have an ic_launcher_round.png file. The mipmap-ldpi directory only has an ic_launcher.png file.

Here is my manifest icon reference:

Manifest:
'Icon
SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
SetApplicationAttribute(android:roundIcon, "@mipmap/ic_launcher_round")

CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background" />
    <foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
)

I presume the issue is that the manifest is looking for the ic_launcher_round file in the mipmap-ldpi directory and not finding it. But the icon generator tool does not generate that file.

Any suggestions?
 
Solution
Based on the behaviour, I became suspicious that the problem is related to file corruption within the project. I ran a clean project and now it is working perfectly.

DawningTruth

Active Member
Licensed User
I created a demo project (attached) to try and duplicate the problem.

And it works perfectly. But, still not working on my main project. The settings are identical.

I tried removing the support-v4 and androidx.core:core and still the same error. PS: Those items are required for other functionality.

I also tried the new icons that work for the demo project and still the same issue.

I also deleted the folder that does not have an ic_launcher_round file in it and no difference.

I did manage to isolate the error to this line in the manifest.

B4X:
SetApplicationAttribute(android:roundIcon, "@mipmap/ic_launcher_round")
 

Attachments

  • Icons.zip
    9.1 KB · Views: 77
Upvote 0

DawningTruth

Active Member
Licensed User
Based on the behaviour, I became suspicious that the problem is related to file corruption within the project. I ran a clean project and now it is working perfectly.
 
Upvote 0
Solution
Top