Minor changes in layout make the application to crash in Android.-Collection of common programming errors

I made an application for android, and it was loading fine in the emulator and phone, and then I made some minor changes like shifting the position of text View elements in the layout with help of “Graphical Layout” editing option in Eclipse. and after that the application no longer starts, it just loads with a blank activity and in 2-3 seconds crashes. The layout that I am using looks like this currently (and this is the crashing state of layout):

    

        

        

        

        

            
        

        

        

        

        

    
  1. Try cleaning and rebuilding the project by going to “Project –> Clean…” then run the app again. After making changes in Eclipse to the layout, sometimes Eclipse doesn’t “get” the changes right away so you end up with a goofy ClassCastException. A cleaning usually fixes this.

    If this doesn’t solve your problem then please post the logcat from the crash but this should do the trick.

  2. I had several problems with Android build tool on both Eclipse and IntelliJ. Usually result in xml file doesn’t get updated or shift up or down by a line or two. Usually, by rebuilding the project or restarting your IDE would fix this problem.

  3. // try this