I'm reading this forums regularly. And very often, at least once a week there is a person in here asking for help because his app has crashed. Thats fine and all that, but for us to be able to help you, we need to see the exception thrown and if possible the code that produced the exception.
So, how to do this?
1. I'm assuming you already have installed Android SDK and are developing in Eclipse with ADT plugin installed.
2. Launch the app in the emulator or your device(you must have it connected to the computer and the drivers must be installed).
3. When your app crashes, open Eclipse. Go to Window -> Show View -> Other... -> Android -> LogCat
4. The LogCat window will contain alot of information. To reduce the information, click on the green + sign to create a new filter. The only things you need to fill out are: 'Filter name' and 'by log tag' or by 'log level'. If you choose 'by log level' set this to 'error' and click ok.
5. Now you should have only red writing in the window which means you are only viewing the exceptions. Find the start of the exception, it usally starts with: 'FATAL EXCEPTION: main', and the end of the exception which usally ends with: '... x more'. Mark the beginning, hold shitft and mark the end and copy the selected lines by clicking 'Export selected items to text file...'. An exception very often look like this:
Code:
10-20 16:42:08.936: E/AndroidRuntime(339): FATAL EXCEPTION: main
10-20 16:42:08.936: E/AndroidRuntime(339): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.package.name/my.package.name.TestActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.os.Handler.dispatchMessage(Handler.java:99)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.os.Looper.loop(Looper.java:123)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread.main(ActivityThread.java:3683)
10-20 16:42:08.936: E/AndroidRuntime(339): at java.lang.reflect.Method.invokeNative(Native Method)
10-20 16:42:08.936: E/AndroidRuntime(339): at java.lang.reflect.Method.invoke(Method.java:507)
10-20 16:42:08.936: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-20 16:42:08.936: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-20 16:42:08.936: E/AndroidRuntime(339): at dalvik.system.NativeStart.main(Native Method)
10-20 16:42:08.936: E/AndroidRuntime(339): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
10-20 16:42:08.936: E/AndroidRuntime(339): at android.content.res.Resources.getText(Resources.java:201)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.content.res.Resources.getString(Resources.java:254)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.content.Context.getString(Context.java:183)
10-20 16:42:08.936: E/AndroidRuntime(339): at my.package.name.TestActivity.onCreate(TestActivity.java:12)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-20 16:42:08.936: E/AndroidRuntime(339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
10-20 16:42:08.936: E/AndroidRuntime(339): ... 11 more
6. When you now ask for help, paste the content of the exported file, and if possible the code which produced the exception. Where in your code this is is stated in the exception. In the example exception it is stated like this:
Code:
10-20 16:42:08.936: E/AndroidRuntime(339): at my.package.name.TestActivity.onCreate(TestActivity.java:12)
What this tells me is that the exception is beeing thrown in the onCreate method of class TestActivity on line 12.