Android. SQLite Exception: no such column _id

前端 未结 6 1261
鱼传尺愫
鱼传尺愫 2021-01-13 09:56

Im having some troubles trying to get the info stored in my database and showing it in a ListView.

This is the ListActivity where i want to show the rows:

         


        
6条回答
  •  别那么骄傲
    2021-01-13 10:35

    This is can exists 2 possiblities:

    1. This problem can occurred from broken SQLite schema.

    Your question is not about SQL Statement problem. but many developer can think SQL Statement problem about your question.

    This case can check no demaged data in your database file. Although you can not use select fields and sql where clause by field name.

    As a result, you can not use database file in your android code.

    Exactly solution, I recommend recreate SQLite DB file, step by step.

    You must be backup before use SQLite modification tool. (SQLite Manager, Browser, others db manage tools)

    1. This problem occurred from your persistent data.

    If you use the same file name for assets or raw data when run with modified data,

    you can try uninstall previous installed app for refresh.

提交回复
热议问题