-1
11-26 15:31:08.069: E/Cursor(387): Finalizing a Cursor that has not been deactivated or closed. database = /data/data/com.example.blind.pro/databases/ComsatsGPS, table = null, query = SELECT * FROM instruct
11-26 15:31:08.069: E/Cursor(387): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
11-26 15:31:08.069: E/Cursor(387):  at android.database.sqlite.SQLiteCursor.<init>(SQLiteCursor.java:210)
11-26 15:31:08.069: E/Cursor(387):  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:53)
11-26 15:31:08.069: E/Cursor(387):  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
11-26 15:31:08.069: E/Cursor(387):  at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1315)
11-26 15:31:08.069: E/Cursor(387):  at com.example.blind.pro.DatabaseHandler.getInstructionByName(DatabaseHandler.java:643)
11-26 15:31:08.069: E/Cursor(387):  at com.example.blind.pro.InterfaceActivity.buttonGetLocationClick(InterfaceActivity.java:879)
11-26 15:31:08.069: E/Cursor(387):  at com.example.blind.pro.InterfaceActivity$2.onLongClick(InterfaceActivity.java:78)
11-26 15:31:08.069: E/Cursor(387):  at android.view.View.performLongClick(View.java:2427)
11-26 15:31:08.069: E/Cursor(387):  at android.widget.TextView.performLongClick(TextView.java:7286)
11-26 15:31:08.069: E/Cursor(387):  at android.view.View$CheckForLongPress.run(View.java:8792)
11-26 15:31:08.069: E/Cursor(387):  at android.os.Handler.handleCallback(Handler.java:587)
11-26 15:31:08.069: E/Cursor(387):  at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 15:31:08.069: E/Cursor(387):  at android.os.Looper.loop(Looper.java:123)
11-26 15:31:08.069: E/Cursor(387):  at android.app.ActivityThread.main(ActivityThread.java:4627)
11-26 15:31:08.069: E/Cursor(387):  at java.lang.reflect.Method.invokeNative(Native Method)
11-26 15:31:08.069: E/Cursor(387):  at java.lang.reflect.Method.invoke(Method.java:521)
11-26 15:31:08.069: E/Cursor(387):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-26 15:31:08.069: E/Cursor(387):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-26 15:31:08.069: E/Cursor(387):  at dalvik.system.NativeStart.main(Native Method)
4

1 回答 1

0

Close the cursor you are using. Use cursor.close().

于 2012-11-26T10:43:19.793 回答