首页 > 代码库 > java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()' on a null object reference

java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()' on a null object reference

NullPointerException:查看自己的什么地方是否对空指针进行了操作

 Attempt to invoke virtual method ‘java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()‘ on a null object reference

尝试用一个空对象引用调用LoadProvinces()方法,查看调用LoadProvinces()的对象是否初始化,很可能是因为你没有初始化就调用了LoadProvinces()方法。

java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()' on a null object reference