我正在尝试查看我在Android Studio中创建的数据库,但是当我转到Android设备监视器时,它说我没有设备。我不知道如何在设备监视器中获取我的程序。 我的数据库代码如下:
public class DatabasHelper extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "animals.db";
public static final String TABLE_NAME = "animals_table";
public static final String ID = "Animal_ID";
public static final String STAFF = "Staff_name";
public static final String ACTIVITY = "Activity";
public static final String DETAIL = "Detail";
public DatabasHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
SQLiteDatabase db = this.getWritableDatabase();
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table " + TABLE_NAME + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, ACTIVITY TEXT,DETAIL TEXT) ");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
}
}
但我不认为这是我的代码,因为它工作正常。如果有人能提供帮助那就太棒了。