开发者

DataBase Access Problem in Android1.6

开发者 https://www.devze.com 2023-03-14 17:56 出处:网络
I m accessing SQLite databse from the following location/data/data/files/examples/search.sqlite it works fine in Samsung Ta开发者_开发技巧blet but when i run the same code in android 1.6 it throws the

I m accessing SQLite databse from the following location/data/data/files/examples/search.sqlite it works fine in Samsung Ta开发者_开发技巧blet but when i run the same code in android 1.6 it throws the error.

06-23 09:06:24.996: ERROR/AndroidRuntime(221): java.lang.IllegalArgumentException: File /data/data/files/examples/search.sqlite contains a path separator

I was wonder why this error throws in android 1.6 not in samsung Galaxy tab i.e., android 2.2


There is no /data/data/files/examples/ directory on any Android device that I am aware of. Please use a real directory, one that is actually possible. For example, getDatabasePath() will return a valid path to a SQLite database file.

0

精彩评论

暂无评论...
验证码 换一张
取 消