2012-11-26 41 views
-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) 
+1

你缺少關閉數據庫.. –

+0

通過寫入cursor.close()來關閉遊標。 –

+0

請提供關於這個問題的一些描述,並提出一些關於你的研究的評論? – Vishal

回答

0

關閉您正在使用的光標。使用cursor.close()

相關問題