Thanks Mark,

This is what I got from the phone log:
04-02 23:04:46.576 I/ActivityManager( 1368): Start proc
com.raghavsood.mpfor activity
com.raghavsood.mp/.matchpuzzler: pid=25262 uid=10113 gids={3003}
04-02 23:04:46.726 E/AndroidRuntime(25262): FATAL EXCEPTION: main
04-02 23:04:46.726 E/AndroidRuntime(25262): java.lang.RuntimeException:
Unable to instantiate activity ComponentInfo{
com.raghavsood.mp/com.raghavsood.mp.matchpuzzler}:
java.lang.NullPointerException
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.os.Looper.loop(Looper.java:123)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
android.app.ActivityThread.main(ActivityThread.java:4627)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.reflect.Method.invokeNative(Native Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.reflect.Method.invoke(Method.java:521)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
dalvik.system.NativeStart.main(Native Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): Caused by:
java.lang.NullPointerException
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.Activity.
findViewById(Activity.java:1637)
04-02 23:04:46.726 E/AndroidRuntime(25262): at com.raghavsood.mp.
matchpuzzler.<init>(matchpuzzler.java:14)
04-02 23:04:46.726 E/AndroidRuntime(25262): at
java.lang.Class.newInstanceImpl(Native
Method)
04-02 23:04:46.726 E/AndroidRuntime(25262): at java.lang.Class.newInstance(
Class.java:1429)
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.Instrumentation.
newActivity(Instrumentation.java:1021)
04-02 23:04:46.726 E/AndroidRuntime(25262): at android.app.ActivityThread.
performLaunchActivity(ActivityThread.java:2577)
04-02 23:04:46.726 E/AndroidRuntime(25262): ... 11 more
04-02 23:04:46.736 W/ActivityManager( 1368):   Force finishing activity
com.raghavsood.mp/.matchpuzzler

I can't understand this very well but from what I got it seems like the
error is at findviewbyid (in red). Is this right? if so does anyone know how
I can fix it?

On Sat, Apr 2, 2011 at 11:15 PM, Mark Murphy <[email protected]>wrote:

> On Sat, Apr 2, 2011 at 1:41 PM, Raghav Sood <[email protected]> wrote:
> > I am testing it on my phone. The emulator has never finished booting on
> my
> > computer. How to I write errors to the logfile on the phone?
>
> Stack traces are automatically written to LogCat on the phone. Use adb
> logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat.
>
> http://developer.android.com/guide/developing/device.html
>
> http://developer.android.com/guide/developing/debugging/debugging-projects.html#toptips
> http://developer.android.com/guide/developing/debugging/ddms.html
> http://developer.android.com/guide/developing/debugging/debugging-log.html
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version
> 1.9.2 Available!
>
> --
> 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
>



-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/

-- 
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

Reply via email to