我创建一个Sqlite database
,当我想看看,当时使用File_Explorer
database
,我没有得到它在该位置只有两个文件夹都存在有: Cache
, lib
,但database
文件夹不存在在那里,但问题是,我得到它的location
也由LOGS
,无法看到SQLite数据库在我的Android的FileExplore
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_db__creation);
database db = new database(this);
}
// -- SqliteOpenHelper class (extended)!
public database(Context context)
{
super(context, "New_one.db" , null , 2);
Log.i("2nd class : constructor","tushar");
Log.i(context.getDatabasePath("New_one.db").toString(),"tushar");
//(data base location)
///data/data/com.example.database_creation/databases/New_one.db
}
public void onCreate(SQLiteDatabase db)
{
Log.i("2nd class : onCreate", "tushar");
db.execSQL("create table timerecords " +"(id integer primary key, time text, notes text)");
}
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
}
运行代码在模拟器和尝试 – 2013-04-05 05:38:44
是数据库中创建? – Riskhan 2013-04-05 05:44:26
如果你的设备是根源的,那么可以继续在eclipse中从文件浏览器查看数据库的db,否则在模拟器中运行。 – 2013-04-05 05:54:42