07-12 07:34:04. 411: Warn/system. Err (533): Java. Lang. illegalstateexception: Database not open
07-12 07:34:04. 440: Warn/system. Err (533): At android.database.sqlite.sqlitedatabase.exe csql (sqlitedatabase. Java: 1759)
These two rows are error messages
OnCode. However, database not open is reported this time. This problem has not occurred before.
After checking, I found that I first dropped the query in a method and then executed the create operation. In the method, I operated the database twice in total.
The getwritabledatabase method is used at one time, and the getreadabledatabase method is used at one time.
After the query, I disabled the sqlitedatabase obtained by getreadabledatabase,
As a result, this operation directly affects the sqlitedatabase obtained by getwritabledatabase.
Solution: Put the statement of sqlitedatabase obtained through getwritabledatabase after the query!