Android Fails To Create A Sql Database On My Device
I have some simple code which should create a database. package com.webfoo.android.databaseExample; import android.app.Activity; import android.os.Bundle; public class DatabaseEx
Solution 1:
You haven't called getWritableDatabase()
or getReadableDatabase()
yet.
e.g.
jokesHelperdbHelper=newjokesHelper(getBaseContext());
SQLiteDatabasedb= dbHelper.getWritableDatabase();
The databases are not stored on the SD card or otherwise USB-mountable storage (at least not by default). They are in "internal" storage. The path in your comment above is almost right, but I'm not sure what "DATA" means. The path is: /data/data/<package name>/databases
. You can check that by using adb shell ls /data/data/<package name>/databases
.
Post a Comment for "Android Fails To Create A Sql Database On My Device"