这是获取 NullPointerException 错误的代码:
InputStream is = getAssets().open("twentyone.txt");
InputStreamReader iz=new InputStreamReader(is);
BufferedReader br = new BufferedReader(iz);
可能出了什么问题?
*编辑:printStackTrace
03-19 18:20:18.662: E/AndroidRuntime(929): Caused by: java.lang.NullPointerException
编辑2:代码直到异常:
public class ListViewAa3 extends ListViewA{
public String[] process(String cti)throws IOException{
String ctid=cti;
Log.d("Outside try invoked","tag1");
try{
Log.d("beginning of try invoked","tag2");
try{
InputStream is = getAssets().open("USCOUNTIES.txt");
InputStreamReader iz=new InputStreamReader(is);
BufferedReader br = new BufferedReader(iz);}catch(Exception e){e.printStackTrace();}