java.lang.NullPointerException:Attempt to invoke virtual method xxx on a null object reference

来源:互联网 发布:南京雨花台区网络问政 编辑:程序博客网 时间:2024/05/01 14:36

java.lang.NullPointerException: Attempt to invoke virtual method ‘com.zhongtie.zzxt.potopicker.PickerConfig com.zhongtie.zzxt.potopicker.utils.PickerHelper.getConfig()’ on a null object reference

今天从AndroidStudio中复制了一个项目到eclipse中,莫名其妙出现这个问题,
后来发现是因为在复制过程中 findviewbyid 的控件在 .R中的id没有改变,我们只需要在eclipse中将对应的xml中的控件换一个id同时findviewbyid 换成对应的id就可以了,希望对大家有用

1 0