To preface this question, this is my first app and I have a very basic understanding of android apps.
My first problem is the issue with screen orientation change. I’ve seen this question asked on here a million times, but I don’t really understand the answers and I’m not sure if it is the same situation or not. My app crashes when the screen orientation changes. I am not using ViewFlipper as a lot of the questions mention. My app also crashes when you try to scroll through the options in a spinner. The spinner is populated correctly, and you can open it and select an option, but scrolling or opening it and changing selection multiple times causes a crash. I think my biggest problem here is I am not used to the Eclipse IDE or java (I am a .net developer primarily) and I feel like it leaves me completely in the dark when it crashes. All it ever says is “Source not found”. That doesn’t help me much.
So I guess my question is: does anyone know what would cause the application to crash in either of these two instances and/or how do I go about debugging the issues when it simply says “source not found”?
I figured out the issues. Sort of anyways.
The spinner crash was caused by a null value in the array I was binding as the source. So that one was my fault.
The orientation crash was caused by… I’m not really sure. But to investigate I inserted
android:configChanges="orientation"into the manifest to be able to handle theonConfigurationChangedevent. I inserted the code to override the method and the problem stopped completely.That is the code necessary to fix the problem in it’s entirety. I have no idea what was causing the problem or why that fixed it so if anyone can shed some light please comment!