• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Unfortunatetly My First App has stopped

pooh15

Lurker
I have been following the android tutorial for building my first app.
but its displaying the error as UNFORTUNATELY MY FIRST APP HAS STOPPED.
since i am new i have no idea how to deal with this issue. searched internet but all of them have different errors mentioned in their logcat.couldn't locate mine.
please help if anybody knows the solution.
here's my logcat:

02-11 17:02:04.010: E/AndroidRuntime(809): FATAL EXCEPTION: main
02-11 17:02:04.010: E/AndroidRuntime(809): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfirstapp/com.example.myfirstapp.DisplayMessageActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x28
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.os.Handler.dispatchMessage(Handler.java:99)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.os.Looper.loop(Looper.java:137)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-11 17:02:04.010: E/AndroidRuntime(809): at java.lang.reflect.Method.invokeNative(Native Method)
02-11 17:02:04.010: E/AndroidRuntime(809): at java.lang.reflect.Method.invoke(Method.java:511)
02-11 17:02:04.010: E/AndroidRuntime(809): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-11 17:02:04.010: E/AndroidRuntime(809): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-11 17:02:04.010: E/AndroidRuntime(809): at dalvik.system.NativeStart.main(Native Method)
02-11 17:02:04.010: E/AndroidRuntime(809): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x28
02-11 17:02:04.010: E/AndroidRuntime(809): at android.content.res.Resources.getText(Resources.java:230)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.widget.TextView.setText(TextView.java:3640)
02-11 17:02:04.010: E/AndroidRuntime(809): at com.example.myfirstapp.DisplayMessageActivity.onCreate(DisplayMessageActivity.java:29)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.Activity.performCreate(Activity.java:5104)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
02-11 17:02:04.010: E/AndroidRuntime(809): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
02-11 17:02:04.010: E/AndroidRuntime(809): ... 11 more


Thanks in advance..!! :)
 
Have a look at Line 29 of your DisplayMessageActivity code. You're trying to set the text of a TextView via the setText method but you use some Resource that does not exist...
 
Back
Top Bottom