Note that there are some explanatory texts on larger screens.

plurals
  1. POerror creating database in android
    primarykey
    data
    text
    <p>i am displaying the database in a listview in android. i am displaying the listview in another activity. i am creating database in oncreate by just calling a class called "data" that extends sqliteopenhelper and passing the table but as soon as i launch the app the stack trace in DDMS is</p> <pre><code>08-23 14:29:07.771: ERROR/Database(5175): Leak found 08-23 14:29:07.771: ERROR/Database(5175): java.lang.IllegalStateException: /data/data/com.cortes/databases/location.db SQLiteDatabase created and never closed 08-23 14:29:07.771: ERROR/Database(5175): at android.database.sqlite.SQLiteDatabase.&lt;init&gt;(SQLiteDatabase.java:1792) 08-23 14:29:07.771: ERROR/Database(5175): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:798) 08-23 14:29:07.771: ERROR/Database(5175): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:857) 08-23 14:29:07.771: ERROR/Database(5175): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:850) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:539) 08-23 14:29:07.771: ERROR/Database(5175): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:193) 08-23 14:29:07.771: ERROR/Database(5175): at com.cortes.Cortes.onCreate(Cortes.java:79) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 08-23 14:29:07.771: ERROR/Database(5175): at android.os.Handler.dispatchMessage(Handler.java:99) 08-23 14:29:07.771: ERROR/Database(5175): at android.os.Looper.loop(Looper.java:123) 08-23 14:29:07.771: ERROR/Database(5175): at android.app.ActivityThread.main(ActivityThread.java:4363) 08-23 14:29:07.771: ERROR/Database(5175): at java.lang.reflect.Method.invokeNative(Native Method) 08-23 14:29:07.771: ERROR/Database(5175): at java.lang.reflect.Method.invoke(Method.java:521) 08-23 14:29:07.771: ERROR/Database(5175): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862) 08-23 14:29:07.771: ERROR/Database(5175): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 08-23 14:29:07.771: ERROR/Database(5175): at dalvik.system.NativeStart.main(Native Method) 08-23 14:29:07.846: ERROR/wpa_supplicant(2300): wpa_driver_priv_driver_cmd failed 08-23 14:29:07.846: ERROR/wpa_supplicant(2300): wpa_driver_priv_driver_cmd failed </code></pre> <p>and my code is</p> <pre><code>db = this.openOrCreateDatabase("location.db", SQLiteDatabase.OPEN_READWRITE, null); d = new data(this,Geo_Create_Table); db=d.getWritableDatabase(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload