unable to insert data into sqlite database for android device

前端 未结 2 1041
慢半拍i
慢半拍i 2021-01-27 05:47

I\'ve met an unknown error while inserting data into the database. The LogCat had been display \"unable to insert data\", however, the code that I\'ve used is copied from anothe

2条回答
  •  情话喂你
    2021-01-27 06:42

    AlertDialog.Builder builder = new AlertDialog.Builder(this); don`t use "this" inside any click listener , because it refer current view instead of parent view. Try to use className.this like as follows...

     AlertDialog.Builder builder = new AlertDialog.Builder(className.this);
    

提交回复
热议问题