(A student asked this). The app keeps quitting unexpectedly when I run it -- how can I tell what is going wrong?
In terms of your error, you should check the logcat view in Android Studio to find what specific error message you are getting when the program crashes. (e.g. is it a NullPointerException? on what line of your code is it happening?)
You can also print debugging information to the logcat similar to how you would with the console in Eclipse. Printing out values to logcat may help you figure out what is going wrong, and when.
Here's a tutorial that might help: https://www.101apps.co.za/articles/using-android-s-log-class-api-to-debug-android-application-code.html