java.lang.NullPointerException: println needs a message

早过忘川 提交于 2019-11-29 05:30:26
NitroG42

Maybe when you call

Log.d("sql_id", cursor.getString(0)); 

cursor.getString(0) returns null, and then it crashes.

Try :

if(cursor.getString(0) != null) {
    Log.d("sql_id", cursor.getString(0)); 
}

Otherwise, show us: de.bodprod.dkr.BosLstDetailMap.onCreate(BosLstDetailMap.java:43)

try as:

Log.d("sql_id"," " + cursor.getString(0));

instead of

Log.d("sql_id", cursor.getString(0));

beacuse maybe you are passing second parameter in Log.d empty or null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!