Hi all,

I have made a simple game application that saves to a file named
"scores.txt" (no prizes for guessing what it saves there..). The
activity containing the actual game does the saving, and I am trying
to access the file and display its contents from the main menu
activity.

However when I attempt to open the file I get the error:
11-28 17:13:59.617: ERROR/I/O ERROR(193): Error when trying to access
scores.txt - java.lang.IllegalStateException: The specified child
already has a parent. You must call removeView() on the child's parent
first.

I'm not sure what this means, as I get this error whether I have gone
straight to open the scores.txt file, or I have played the game first,
then tried to open the file.

If it is relevant, I have used mode 0, or MODE_PRIVATE on the
fileoutputstream in the "game" activity, however I don't think this
should make much difference as I am told by the documentation that:

"File creation mode: the default mode, where the created file can only
be accessed by the calling application (or all applications sharing
the same user ID)."

Though I am in a different activity, the application remains the
same...

Any help would be much appreciated! :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to