
Jay Teck
UH
i imported Yabma 5 Corresponds to Chapter 10 - Lists and Adapters, in to eclipse.
it compiled and ran, i set the 3 preferences.
Then I started the service.
It was able to insert one time, then got a fatal exception in main.
06-10 12:19:48.617: E/AndroidRuntime(1463): java.lang.RuntimeException: Unable to resume activity {com.marakana.yamba5/com.marakana.yamba5.TimelineActivity}: java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@41294338
I've looked at it for quite a while...and this type of error is beyond me.
I cleaned the project, uninstalled it from the emulator, and restarted eclipse.
--worked-- !
It seems every chapter (every chapter since the database was introduced) the application data and the application itself needs to be removed from the emulator and everything shut down, cleaned (no database should exist), and restarted. Before I learned this I was wasting a lot of time chasing obscure errors.
Edited one time. Last edit by Jay Teck on Jun 10, 2012 at 5:25:26 PM (about one year ago).

Dave Tong
CST
I tried your solution, but it didn't work for me. However, i found another solution. Since the exception is about cursor, i just comment the startManagingCursor(cursor), and problem solved.
Although, I don't known what's behind the scene, i just hope this can solve the current obstacle.