close() was never explicitly called on databaseandroid.database.sqlite异常

前端之家收集整理的这篇文章主要介绍了close() was never explicitly called on databaseandroid.database.sqlite异常前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ERROR/Database(3236): close() was never explicitly called on databaseandroid.database.sqlite.

DatabaSEObjectNotClosedException: Application did not close the cursor or database object that was opened here

它会产生一个异常提示,但程序是不会中止。

字面上理解是database没有正常关闭,实际是因为重复实例化了你的database,或者说你连接已经建立,而你又尝试打开另一个连接时才会有异常。所以解决的办法是,保证你只打开一次连接。

猜你在找的Sqlite相关文章