java.lang.IllegalStateException:尝试重新打开已经关闭的对象SQLiteQuery

时间:2015-04-29 12:57:39

标签: android

04-29 18:24:24.676: E/AndroidRuntime(5640): FATAL EXCEPTION: main
04-29 18:24:24.676: E/AndroidRuntime(5640): Process: com.example.mapsproject, PID: 5640
04-29 18:24:24.676: E/AndroidRuntime(5640): java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteQuery: SELECT DISTINCT _id, name, loc, lat, lng, zoom, uid FROM MapsProject GROUP BY uid
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:58)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:152)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.database.sqlite.SQLiteCursor.onMove(SQLiteCursor.java:124)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:214)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.CursorAdapter.getView(CursorAdapter.java:245)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.AbsListView.obtainView(AbsListView.java:2347)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.ListView.makeAndAddView(ListView.java:1864)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.ListView.fillDown(ListView.java:698)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.ListView.fillFromTop(ListView.java:759)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.ListView.layoutChildren(ListView.java:1673)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.AbsListView.onLayout(AbsListView.java:2151)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.View.layout(View.java:15671)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.View.layout(View.java:15671)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.View.layout(View.java:15671)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.View.layout(View.java:15671)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.View.layout(View.java:15671)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewGroup.layout(ViewGroup.java:5038)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.Choreographer.doCallbacks(Choreographer.java:580)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.Choreographer.doFrame(Choreographer.java:550)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.os.Handler.handleCallback(Handler.java:739)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.os.Handler.dispatchMessage(Handler.java:95)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.os.Looper.loop(Looper.java:135)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at android.app.ActivityThread.main(ActivityThread.java:5254)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at java.lang.reflect.Method.invoke(Native Method)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at java.lang.reflect.Method.invoke(Method.java:372)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
04-29 18:24:24.676: E/AndroidRuntime(5640):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

1 个答案:

答案 0 :(得分:1)

您的sqlite数据库对象已关闭。请重新打开数据库对象并执行查询操作。