菜鸟错误大全(三)
我们都是从新手一步一个坑踩过来的,下面我们来讲讲会遇到的常见错误和解决办法:
android.database.sqlite.SQLiteException: near “autoincrement”: syntax error (code 1): , while compiling: create table Book(id integer primarry key autoincrement,author text,price real,pages integer,name text):SQL语句创建数据库的时候,语句写错,看关键字有没有写错,例如CREATE_BOOK=”create table Book(“+”id integer primarry key autoincrement,”+”author text,”+”price real,”+”pages integer,”+”name text)”;中的primarry写错了,就会报错,应该改为primary