Bug? App Icon not maintained

Roycefer

Well-Known Member
Licensed User
Longtime User
When I create an Android project in B4A 9.50 and set an app icon, it compiles with that icon just fine. But then I push to GitHub and someone else pulls from GitHub and compiles. Their version of the app has the default B4A icon, not the icon I had set. I checked the .b4a file and the IconFile attribute in the DesignText area is empty on both my local branch and on GitHub (and by extension, the other person's local branch). They can then set the app icon themselves. But they shouldn't have to do this, right? I would think it should be retained, presumably by that IconFile attribute.
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
The icon is held in the Objects/res/drawable. You need to stage this file.
Normally the Objects folder is set to ignore in the .gitignore file.
 

Roycefer

Well-Known Member
Licensed User
Longtime User
That's the generated icon. The image that was the basis for the icon lives inside Files and is staged. I should think that the IconFile attribute would point to the image file inside Files so we wouldn't have to stage any generated files.
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Whilst I agree with you, "should" is the operative word here. I have experienced exactly the same issue you raise.

What actually happens is that when you add the icon the object/res/drawable directory is updated. This is the location that is used.

The solution I found is is as described. I don't believe that this is a bug. Perhaps you should raise a "Wish" instead

Alternatively, you could use something like this post to store the icon elsewhere
https://www.b4x.com/android/forum/t...sed-on-the-build-configuration.40875/#content
 
Top