tags:

views:

38

answers:

1

I have followed the instructions on http://developer.android.com/resources/tutorials/testing/helloandroid_test.html.

But when I run my application, I get the following error in the testPreconditions function.

Incomplete: Unable to start activity ComponentInfo{com.example.helloandroid/com.example.helloandroid.HelloAndroid}: java.lang.NullPointerException

I have checked the code and it is same as the one posted in the tutorial. I also put breakpoints and tried out to print error statements. But neither worked. Any idea on why am I getting this exception and how to get rid of it?

A: 

Some object is null when you're using it, such as calling a method. Could you post your code in question and the stack trace so we can give more specific answers?

Andy Zhang