自己导入的stu.db无法使用 但是在onCreate方法内创建的db就可以用
问题1:如图为什么在两个路径下都会出现有数据库文件 伴生的stu.db-journal又是有什么用处
问题2:多次报错后改用onCreate方法内创建数据库就可以成功使用 为什么Monitor直接导入stu.db就不行
问题3:即使使用onCreate方法创建数据库 仍在logcat中发现报错
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 12 - 06 16 : 11 : 07.011 1145 - 1145 /? E/AudioMixer: AudioMixer::getTrackName out of available tracks 12 - 06 16 : 11 : 07.011 1145 - 1145 /? E/AudioFlinger: no more track names available createTrack_l() initCheck failed - 12 ; no control block? 12 - 06 16 : 11 : 07.011 1562 - 1647 /system_process E/AudioTrack: AudioFlinger could not create track, status: - 12 12 - 06 16 : 11 : 07.012 1562 - 1647 /system_process E/SoundPool: Error creating AudioTrack 12 - 06 16 : 11 : 07.014 16992 - 16992 /com.imooc.studio.sqlitedatabasedemo W/FileUtils: Failed to chmod(/storage/sdcard/stu.db): android.system.ErrnoException: chmod failed: EPERM (Operation not permitted) 12 - 06 16 : 11 : 16.749 1726 - 1726 /com.android.inputmethod.latin I/LatinIME: Starting input. Cursor position = 3 , 3 12 - 06 16 : 11 : 16.807 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 16.815 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 16.927 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 16.949 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 25.186 1726 - 1726 /com.android.inputmethod.latin I/LatinIME: Starting input. Cursor position = 2 , 2 12 - 06 16 : 11 : 25.239 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 25.248 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 25.256 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 25.283 16992 - 17008 /com.imooc.studio.sqlitedatabasedemo D/EGL_emulation: eglMakeCurrent: 0x7fa64b481200 : ver 3 1 12 - 06 16 : 11 : 28.842 1562 - 1647 /system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client 12 - 06 16 : 11 : 28.842 1145 - 1950 /? E/AudioMixer: AudioMixer::getTrackName out of available tracks 12 - 06 16 : 11 : 28.842 1145 - 1950 /? E/AudioFlinger: no more track names available createTrack_l() initCheck failed - 12 ; no control block? 12 - 06 16 : 11 : 28.843 1562 - 1647 /system_process E/AudioTrack: AudioFlinger could not create track, status: - 12 12 - 06 16 : 11 : 28.843 16992 - 16992 /com.imooc.studio.sqlitedatabasedemo W/FileUtils: Failed to chmod(/storage/sdcard/stu.db): android.system.ErrnoException: chmod failed: EPERM (Operation not permitted) 12 - 06 16 : 11 : 28.844 1562 - 1647 /system_process E/SoundPool: Error creating AudioTrack |
1
收起
正在回答
3回答
这是系统对你的一个提示而已!系统对于不同的文件夹有着不同的功能和定义,如:专门存放音频的,图片的等。而对于开发者来说,最好不要用那些特殊意义的文件夹。你可以在sdcard新建一个文件夹,并存放你需要的资料就行了。
Android网络操作与数据存储2018版
- 参与学习 人
- 提交作业 307 份
- 解答问题 1613 个
本专题是联网及数据处理的必备技能。课程从网络基础知识到线程间协同工作、异步下载处理。介绍了Android内外部文件存储、轻量级数据库SQLite的使用。利用屏幕适配、状态保持、百度地图解决实际问题。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧