Doug Sisco
Doug Sisco

Reputation: 161

Codename One GUI Builder button images are deleted after each build

This is the same problem as I posted Dec 2022: "CodenameOne Cannot Add Image to Button Using GUI Builder". It hasn't been a problem on the two most recent projects I've deployed because I haven't used images (I gave up on getting this fixed).

I created this new post because I know a little more about how CNO works and I think I posted some incorrect information last time.

So my project is NOT using CSS, and I am using the new GUI Builder. In the GUI Builder I add an image to a button by clicking the "Add Image" icon at the top-right. I navigate to the image source (a png file) and add it.

Then I go to the button's Property Inspector and click on "Icon [Pick Image]". I choose "res file" and then click on the newly added image source. So far so good: I can now see the icon image in the form. I save the GUI Builder form, build the project and run the simulator and wow, it shows my button image!

But now (without changing anything) I re-run the simulator and my button image is gone!

If I go back to the button's Property Inspector and attempt to add the image I see that it's gone from there too.

So for some reason the image is getting deleted from the res file during the build. I have included the two output files, one from the first build and also from the second.

I really need a fix for this: Shai, is there some way we can schedule a phone call for paid support?

Here is the output from the 1st build, and Here is the output from the 2nd build.

Upvotes: 1

Views: 56

Answers (1)

Doug Sisco
Doug Sisco

Reputation: 161

Thanks to Shai for this answer.. I don't quite understand what was going on, but at last my button images aren't deleted with every build.

The fix was to edit the build.xml file find and remove the depends: .

Upvotes: 0

Related Questions