数据库代码看着没什么错误,但是一创建就打不开,在data里面也找不到有没有大神知道为什么
public class DbHelper extends SQLiteOpenHelper {
private static final int VERSION=1;
private static final String DBNAME="Read";
public DbHelper(Context context){
super(context,DBNAME,null,VERSION);
}
public void onCreate(SQLiteDatabase db){
db.execSQL("create table user_tb(phone varchar(11)primary key autoincrement,password varchar(12))");
}
public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion)
{
db.execSQL("drop table if exists user_tb");
onCreate(db);
}
}
在Mainactivity一read就就进不去
有没有大神救救我T_T