Android Activity — NullPointerException (“unable to instantiate activity ComponentInfo”)?
问题 I'm trying to create a program for Android which will read in text, and then print it out, jsut to get used to using I/O for Android. However, whenever I run it on the AVD, it returns an error in LogCat saying that there is a NullPointerException in my code, and that it is therefore "unable to instantiate activity ComponentInfo". I can't find where I'm referring to anything null. Here is my code: import android.app.*; import android.os.*; import android.view.View; import android.view.View.*;