Sounds like you have a widget member variable and forgot to call
findViewById before using it.
On Wednesday, August 22, 2012 1:14:24 AM UTC-5, Ehsan Sadeghi wrote:
>
> I create an activity Hoghoughi but when i try to start it an error raise :
>
> 08-22 05:50:08.890: E/AndroidRuntime(608): FATAL EXCEPTION: main
> 08-22 05:50:08.890: E/AndroidRuntime(608): java.lang.RuntimeException:
> Unable to start activity
> ComponentInfo{ir.smspeik.sms/ir.smspeik.sms.Hoghoughi}:
> java.lang.NullPointerException
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread.access$600(ActivityThread.java:130)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.os.Looper.loop(Looper.java:137)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread.main(ActivityThread.java:4745)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> java.lang.reflect.Method.invoke(Method.java:511)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> dalvik.system.NativeStart.main(Native Method)
> 08-22 05:50:08.890: E/AndroidRuntime(608): Caused by:
> java.lang.NullPointerException
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> ir.smspeik.sms.Hoghoughi.onCreate(Hoghoughi.java:23)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.Activity.performCreate(Activity.java:5008)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> 08-22 05:50:08.890: E/AndroidRuntime(608): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
>
>
--
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