开发者

Null Pointer Exception when using delete

 AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();

                dDbHelper.deletedJournal(info.id);
                mDbHelper.deleteJournal(info.id);


public bo开发者_StackOverflowolean deletedJournal(long homeId){

        return mDb.delete(DATABASE_TABLE, KEY_HOMEID + "=" + homeId, null )>0;
    }

dDbHelper.deletedJournal(info.id) gives me a null pointer exception


I'm betting that info is null. This might be helpful:

Why is MenuItem.AdapterContextMenuInfo null when my list view has a custom adapter?


Either dDbHelper or info is null.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜