I’m running into a completely bizarre problem and am wondering if anyone has experienced something similar.
I couldn’t figure out why an ImageButton was not appearing on a screen, when several similar ones worked just fine. I discovered that other images worked just fine when used for the same ImageButton XML… and that the image appeared if I changed the filename.
After a few dozen tests, I discovered that I could give the file a short name, a long name, any sort of name… but if the filename started with an “a” or a “b” that the image did not appear. If it started with a “c” or “d” or “e” or a few other letters, it would appear (I did not test every possibility). However, other similarly named images had no trouble. Just this one image.
Then recently it happened again with another image and ImageButton I had added to the app. Once again, changing the first letter to something else made it work… but other very similar buttons and images had no trouble.
Does anyone know why this is happening and how I can fix it to eliminate this bizarre behavior?
Max OS X 10.7.1
Eclipse 3.7.0
Targeting Android 2.2
Yes, I have cleaned the project, uninstalled the app from the phone, restarted Eclipse, restarted the computer and so on. Yes, I am absolutely certain that the name of the file matches what I set in the XML file.
Apparently this was just a quirk with my Eclipse. Sometimes it has done other random, bizarre things–now whenever I run into a bug with no obvious cause, my first step is to clean the project, restart Eclipse and clean the project again. I haven’t seen those issues lately, but I’m afraid I don’t know if it was due to the OS Lion update, or the Android SDK tools update, or something else random. 🙁
If anyone else runs into inexplicably bizarre issues with Eclipse, try restarting and cleaning the project a few times–or perhaps even uninstalling and reinstalling Eclipse.