新手,想写一个学生管理系统,用到SQLite,主活动里一段如下
private Mydatabase mydb;
private AutoCompleteTextView mIDView;
private EditText mPasswordView;
private View mProgressView;
private View mLoginFormView;
@Override
protected void onCreate(BundlesavedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); mydb=newMydatabase(this,"mydatabase",null,1);
SQLiteDatabasedb=mydb.getWritableDatabase();
里面Mydatabase是定义好的继承SQliteOpenHelpe的类应该没有问题。安装到手机上打开直接闪退,而把最后这行SQLiteDatabasedb=mydb.getWritableDatabase();这行注释掉就不会闪退,求教错误出外哪啊T T(android studio抽风看不了logcat)