Permanent NullPointer Exception

1 view
Skip to first unread message

sudopeople

unread,
Nov 18, 2007, 11:03:55 PM11/18/07
to Android Developers
So I ran through the Notepad tutorial and started messing with the v3
solution code, basically trying to figure out some layout stuff.
Don't know exactly what I did but ran into a NullPointer Exception and
it is not going away. After reverting the code that I changed (via
undo) it was still there so I debugged it and traced it down to a
database error.
A warning: 'databases/data does not exist in SQLiteDatabase.open()'
followed by the error: 'android failed to open database file
"databases/data" ...'


After uninstalling the Android SDK (deleting files) and Eclipse, the
problem persists.

I have run the emulator stand-alone outside of Eclipse and my
notepadv3 is still in the apps dir on the "phone"

A. Where are the emulator files stored? So I can find out whats wrong
with the database files...
B. (more importantly) How can I "hard reset" the emulator? I assumed
deleting the SDK would have done this!

Thanks

Raja

unread,
Nov 19, 2007, 6:03:48 AM11/19/07
to android-d...@googlegroups.com
Linux: ~/.android/userdata.img
Windows: C:\Documents and Settings\<loginname>\Application Data\Local\Android\userdata.img

Removing those should reset you to how it was prior to using Android(meaning u lose all information including all installed apps).

HTH
Raja

sudopeople

unread,
Nov 19, 2007, 4:14:45 PM11/19/07
to Android Developers
Wow, thanks a lot Raja!
It wasn't in the exact location you specified but it was close... I
found userdata.img in:

C:\Documents and Settings/<loginname>/Local Settings/Application Data/
Android/

It really bothers me that the emulator just picks a folder to store
this data, especially because the SDK isn't tradtionally "installed".
One would think that program and file structure that are stand-alone
would be totally self contained or at least let you decide where to
store data (like Eclipse's workspaces.)

Thanks again!

sudo people

On Nov 19, 3:03 am, Raja <rajas...@gmail.com> wrote:
> Linux: ~/.android/userdata.img
> Windows: C:\Documents and Settings\<loginname>\Application
> Data\Local\Android\userdata.img
>
> Removing those should reset you to how it was prior to using Android(meaning
> u lose all information including all installed apps).
>
> HTH
> Raja
>

Mike Lyons

unread,
Nov 22, 2007, 2:22:50 PM11/22/07
to Android Developers
The Web page currently at http://code.google.com/android/reference/emulator.html#startup-options
shows the location as "C:\Documents and Settings\<user>\Local Settings
\Android (Windows)".

That is incorrect - there is an "\Application Data" folder before
"\Android", as sudopeople shows above.

A correction to the Web page would be appreciated.

Mike Lyons

unread,
Nov 22, 2007, 2:47:58 PM11/22/07
to Android Developers
As an alternative to deleting the userdata.img file as described
above, have the emulator wipe the data in it as described at
http://code.google.com/android/reference/emulator.html#startup-options
under Data, -wipe-data

If you have the PATH set as recommended, you won't need to track down
the location of the file.
If you are using one of the other disk types, I presume this will work
on the current one .

---------------------------

On Nov 18, 11:03 pm, sudopeople <sudopeo...@gmail.com> wrote:
...
> B. (more importantly) How can I "hard reset" the emulator? I assumed
> deleting the SDK would have done this!
...
Reply all
Reply to author
Forward
0 new messages