On Sat, Mar 31, 2012 at 3:09 PM, Raghav Sood <[email protected]> wrote: > Which are the errors that you have faced most > commonly, and how did you solve them?
I would bet that the #1 most common problem is "my R is screwed up". Symptoms include findViewById() returning something unexpected (e.g., a LinearLayout where you expected a Button). Solution is to clean the project (Project > Clean from Eclipse or ant clean from the command line). Another historically common one -- though I haven't seen it pop up in a while -- is "when I scroll, my list rows have random data in them". This is usually caused by a flawed implementation of getView() on an ArrayAdapter, such as calling findViewById() on the Activity, not the to-be-customized row, and therefore getting the wrong widget. Solution is to debug getView(). You might consider poking through StackOverflow, where we have 162,493 questions cataloged with the android tag, most with answers. You can find those that have the most up-votes (meaning people thought they were good questions and should roughly correlate with problems people encounter a lot) and see which seem to fit your desired structure. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

