Android column '_id' does not exist?

前端 未结 8 974
野性不改
野性不改 2020-11-22 15:39

I\'m having trouble with something that works in the Notepad example. Here\'s the code from the NotepadCodeLab/Notepadv1Solution:

String[] from = new String[         


        
8条回答
  •  半阙折子戏
    2020-11-22 16:11

    Another way of dealing with the lack of an _id column in the table is to write a subclass of CursorWrapper which adds an _id column if necessary.

    This has the advantage of not requiring any changes to tables or queries.

    I have written such a class, and if it's of any interest it can be found at https://github.com/cmgharris/WithIdCursorWrapper

提交回复
热议问题