MainActivity.this.context.getResources()。openRawResource(R.raw.myxmlfile)nullpointer exception

时间:2014-04-03 02:14:27

标签: java android

1 个答案:

答案 0 :(得分:2)

默认构造函数(您设置this.is的位置)在设置this.context之前完成。导致context的{​​{1}}将null。您需要将NullPointerException行移至this.is作业之后。