Sqlite java.lang.IllegalStateException

java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.

http://touchlabblog.tumblr.com/post/24474750219/single-sqlite-connection


Keep a single SQLiteOpenHelper instance in a static context.  Do lazy initialization, and synchronize that method.  When do you close it?  You don’t.  When the app shuts down, it’ll let go of the file reference, if its even holding on to it.

What?!?!?!?!?!?! You have to close your databases!!!!!!!

你可能感兴趣的:(Sqlite java.lang.IllegalStateException)