While working on apps in lab or elsewhere, everyone encounters problems. Please describe a problem you have encountered and how you solved it (solved with help is fine).
We were having issues with making toasts show up in the end of the Chapter 5 CheatActivity after modifying the toasts to recognise when someone has been cheating. Turns out, I had nested the if/else statements incorrectly and made it so the Toast.makeTest() declaration was stuck in an else statement that had little to do with the toasts. A single curly bracket moved up or down a line makes a huge difference...
Once, my code "could not resolve symbol R." This can be caused by several things, but usually it means there's a typo or something else wrong in an xml file. I had misspelled a word on accident. After fixing it and rebuilding, it worked fine. Sometimes just rebuilding the project alone will get rid of the error message, too.
I was having trouble getting my buttons to appear. Several people came to help me, and it wasn't till much later that one of them finally noticed that I had made what was supposed to be a public class private, and misspelled another part of the code. But the XML file never threw and error so it was hard to find.
We encountered a syntax error once where we were trying to override a method, but we accidentally were starting with a capital letter instead of camel case, and it caused various problems for us. Luckily, since we were trying to override an existing method, it pointed us in the right direction because it didn't like us overriding a method that didn't exist.
At one point, my GeoQuiz App kept crashing after I had made some seemingly insignificant changes to the code, and I couldn't figure out why. Eventually I realized that in trying to change LinearLayout to RelativeLayout by changing Linear to Relative and keeping Layout, it had auto-completed into RelativeLayoutLayout. Sometimes you must remember to read through very carefully for typos.
My biggest problem was naming a class wrong, but using the name in the book, so they didn't line up. It took a while to figure out, but once I saw the problem, it was an easy fix.