Android Question App icon doesn't change

In one project app icon doesn't change, despite choosing an icon through (project - choose icon), still I have (android standard icon) when testing the app

Any reason why the app icon can be not updating?

Thank you
 
Current icon was placed by me long time ago, now it doesn't change at all

Also, files in ..Objects\res folder (like mipmap-hdpi) are deleted when I compile the project

In ..Objects\res\drawable I got a new icon, yet when I compile the project, I get the old (previous) icon still

Thank you
 
Upvote 0
The project was an older one, yet I used its files to create a new project, which seems like caused that problem

I might create a new project

Question: which folder shall I copy in order to migrate the designer content between two projects?

Thank you
 
Upvote 0

Ferdari

Active Member
Licensed User
Longtime User
Hi @username_987 ,

✅ To change app icon use the Project menu > Choose icon
1726724718772.png

ℹ️ If Icon not changing check if folders not READ ONLY or PERMISSIONS on Windows

✅ To set resources into your app Use file manager > Add file, or simply drag and drop from Windows file explorer(Designer files too .BAL)
1726724700933.png



ℹ️ Tip: Do not touch ..Objects\res folder, it REGENERATES everytime you COMPILE.

Don't forget to Thank if it helped you.
 
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
Since Android 8 I use the adaptive icons:
 
Upvote 1
Hi @username_987 ,

ℹ️ Tip: Do not touch ..Objects\res folder, it REGENERATES everytime you COMPILE.

Don't forget to Thank if it helped you.
So, things are alright same like what you've guided, I recreated the project, just needs to know where is the files that I can migrate to migrate the designer interface to the new project

Thank you

Since Android 8 I use the adaptive icons:
This is indeed the recommended way to set the icon.
I use it too

Thanks to all of you
 
Upvote 0
Well, the designer can (select all) views, and paste it into the new project's designer

Now I've got a new project, and hope it works well

Thank you
 
Upvote 0
Since Android 8 I use the adaptive icons:
I get an error that I used to not get, sdk is set to version 14 till 34, yet I get the following error when using adaptive icons
B4X:
Linking resources    Error
../icon\mipmap\ic_launcher.xml: error: <adaptive-icon> elements require a sdk version of at least 26.
res\mipmap-anydpi-v26\ic_launcher.xml:3: error: resource mipmap/background (aka .........:mipmap/background) not found.
res\mipmap-anydpi-v26\ic_launcher.xml:4: error: resource mipmap/foreground (aka .........:mipmap/foreground) not found.
error: failed linking file resources.

Picking an icon works now after starting a new project, yet adaptive icons doesn't work, after adding manifest code and (#AdditionalRes: ../icon), I get the error above

I hope someone can help with that

Thank you
 
Upvote 0
It's weird that the manifest code used to work, and now gives an error code as shown above, when adding it, nothing was changed in the IDE as far as I know
 
Upvote 0
That's the content of manifest file, in case of any syntax error, which I'm sure is not there
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="34"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)
 
Upvote 0
I took instructions from another thread earlier. After following the instructions found here:

Adaptive icons now seems to work

Thanks to everyone
 
Upvote 0
Top