Android Error: android.database.StaleDataException: Attempted to access a cursor after it has been closed

During my android development, I came across this during run time:

android.database.StaleDataException: Attempted to access a cursor after it has been closed

I looked over the internet to look for solution on this issue. Many suggestions came out but only one suggestion solved “android.database.StaleDataException: Attempted to access a cursor after it has been closed” error.

It is by using startManagingCursor(cursor). The “cursor” is your result holder of your db query. Do not close you cursor for this time it is handled by the startManagingCursor in its proper time.

Hope this helps.

Android Installation with Eclipse IDE

NOTE: I would advise placing all your installation under ONE FOLDER in a path without spaces(must be followed), e.g C:/AndroidInstallers. For your workspace, might as well place under drive C with folder name AndroidWorkspace.

1. Download and install both JDK and JRE from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html

2.Download and install SDK from this site: http://developer.android.com/sdk/index.html

3.Download and install Eclipse for windows user from http://www.eclipse.org/downloads/

4. You may follow instructions in installing Android in Eclipse from either of the following sites:

4.a. From the “Downloading the ADT Plugin” section of http://developer.android.com/sdk/eclipse-adt.html

4.b. Or from http://developer.android.com/sdk/adding-components.html

5. Makes sure you have made AVD/Emulator using the SDK and AVD Manager. Consider making AVD’s for all versions available.

6. Do instruction under “Configuring the ADT Plugin” section in http://developer.android.com/sdk/eclipse-adt.html

7. You may now make a sample program like “HelloWorld” following the instructions from http://developer.android.com/resources/tutorials/hello-world.html.

GOOD LUCK!!!