Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 6.0 不支持,直接报错结束。 #20

Closed
leveychen opened this issue Mar 5, 2016 · 3 comments
Closed

Android 6.0 不支持,直接报错结束。 #20

leveychen opened this issue Mar 5, 2016 · 3 comments

Comments

@leveychen
Copy link

在6.0上报错。5.1和4.4上面正常。
输出日志

03-05 08:12:55.621 8980-8980/? E/SQLiteLog: (14) cannot open file at line 31278 of [2ef4f3a5b1]
03-05 08:12:55.621 8980-8980/? E/SQLiteLog: (14) os_unix.c:31278: (2) open(/storage/emulated/0/xxxx/database/xxxx.db) - 
03-05 08:12:55.622 8980-8980/? E/SQLiteDatabase: Failed to open database '/storage/emulated/0/xxxx/database/xxxx.db'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
@twiceyuan
Copy link

应该是没处理动态权限的问题。library 的 target 貌似是21,所以应该在自己应用所在的 Module 把这个处理一下

@litesuits
Copy link
Owner

感谢楼上@twiceyuan 帮解答 ,无法打开数据库文件,先检查下权限相关

@leveychen
Copy link
Author

感谢两位回复,已经解决。
原先在application 里面初始化,没有动态判授权,所以炸裂了。
动态授权回调之后初始化数据库就正常了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants