yes. both apps are uninstalled but unable to remove database from the
phone, which originally was created by app1 (and subsequently app2
used the same db name, which screwed up the things)?
I also tried context.deleteFile(DATABASE_NAME);
context.deleteDatabase(DATABASE_NAME);
without any luck.
how to go about deleting/removing db from on the device. permission is
denied even to "cd" to data directory. any idea how to go about this?
Thanks,
On Feb 20, 11:26 am, Kostya Vasilyev <[email protected]> wrote:
> Have you tried uninstalling both applications? For example, "adb uninstall
> your.package.name"?
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
> 16.02.2011 5:37 пользователь "javaxmlsoapdev" <[email protected]> написал:
>
>
>
>
>
>
>
> > I had an existing working application which was creating a database
> > using SQLite helper/code. In another application, which I am
> > developing I copied app1's DBHelper code and honestly forgetting to
> > rename the database name in the DBHelper, which I copied from app1
> > code. Now I keep getting following error for both app1 (from which I
> > copied DBHelper code) and app2 as well. Caused by:
> > java.lang.IllegalStateException: database not open. Seems like
> > something is badly screwed up. Any idea?
>
> > Also when I tried to view database from adb shell I get Permission
> > Defined error.
>
> > 02-15 21:31:25.798: WARN/dalvikvm(10965): threadid=1: thread exiting
> > with uncaught exception (group=0x400259f8)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): FATAL EXCEPTION: main
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965):
> > java.lang.RuntimeException: Unable to start activity ComponentInfo
> > AddressActivity}: java.lang.IllegalStateException: database not open
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2787)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> > 2803)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread.access$2300(ActivityThread.java:135)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.os.Looper.loop(Looper.java:144)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread.main(ActivityThread.java:4937)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > java.lang.reflect.Method.invoke(Method.java:521)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > com.android.internal.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:868)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > dalvik.system.NativeStart.main(Native Method)
>
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): Caused by:
> > java.lang.IllegalStateException: database not open
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:
> > 611)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
>
> android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelp
> er.java:
>
>
>
>
>
>
>
> > 113)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > DataHelper.<init>(DataHelper.java:37)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > AddressActivity.onCreate(AddressActivity.java:15)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> > 1069)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2751)
> > 02-15 21:31:25.808: ERROR/AndroidRuntime(10965): ... 11 more
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en