android sqlite java.lang.IllegalArgumentException: contains a path separator
16lz
2022-06-11
遇到用户报的2.1的机器上sqlite异常的问题,log如下,stackoverflow了一下发现是android 2.2以下的系统不支持在sdcard上用SQLiteOpenHelper操作数据库导致的,在stackoverflow上找到了解决方法,试了下,OK。
http://stackoverflow.com/questions/5332328/sqliteopenhelper-problem-with-fully-qualified-db-path-name
E/AndroidRuntime( 3941): Caused by: java.lang.IllegalArgumentException: .db3 contains a path separatorE/AndroidRuntime( 3941): at android.app.ApplicationContext.makeFilename(ApplicationContext.java:1445)E/AndroidRuntime( 3941): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:473)E/AndroidRuntime( 3941): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:193)E/AndroidRuntime( 3941): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)E/AndroidRuntime( 3941): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158)
更多相关文章
- Android——使用 Broastcast 实现进程间通讯
- android 项目串口通信(serialPort)开发遇到的炕
- android "Only the original thread that created a view hierar
- Android(安卓)SDK下载和更新失败的解决方法!!!
- Android中使用XmlSerializer拼装XML数据
- Android实现手写板和涂鸦功能
- 【起航计划 016】2015 起航计划 Android(安卓)APIDemo的魔鬼步伐
- android flutter 混合开发初探
- Android: 自定义Tab样式