thanks for the update - that could save me some time sometime if I see that kind of weirdness
On Sun, Mar 20, 2011 at 7:16 PM, siliconeagle <rrmu...@gmail.com> wrote: > thanks for the tip. > the prefs file was > <?xml version='1.0' encoding='utf-8' standalone='yes' ?> > <map> > <boolean value="false" /> > <boolean name="initialised" value="true" /> > <boolean name="upd.auto" value="true" /> > <long name="backup.last" value="1300662039054" /> > <string name="msg.read">0.995.18Beta</string> > </map> > > turns out i was writing a null preference name to the prefs - so the > error was correct - though I don't think the API should let you do > that since the prefs cant be read after that. > > anyways, a bit of a schoolboy error, but got there ... > > > thanks for the quick reply, > rob > On Mar 21, 12:34 am, Spiral123 <cumis...@gmail.com> wrote: >> i"m sure someone knows the answer to this off the top of their head, >> but I don't. >> >> My first suggestion would be to install your app on an Emulator >> instance then copy the created SharedPreferences XML file for the app >> to your local computer and inspect it manually to see if it looks like >> you expect. >> >> On Mar 20, 8:17 am, siliconeagle <rrmu...@gmail.com> wrote: >> >> >> >> >> >> >> >> > I am trying to figure out the cause of this error it occurs on startup >> > when i try to get the shared preferences for the app. the code is >> > just: >> >> > settings = this.getSharedPreferences(Globals.PREFS_NAME, 0) >> >> > Seems like a corruption, but the bug is in the app as i have installed >> > it on multiple devices and the same error occurs. I have uninstalled >> > the app and re-installed it to no avail. also did a fully clean build. >> > I googled the error and dont seem to be able to find anything on it. >> >> > I was previously working fine. so I am a rather stumped. Any leads >> > would be *very* highly appreciated ... >> >> > regards, >> > rob >> > -------------------------------------------------------------------- >> > W/ApplicationContext( 1541): getSharedPreferences >> > W/ApplicationContext( 1541): org.xmlpull.v1.XmlPullParserException: >> > Map value without name attribute: boolean >> > W/ApplicationContext( 1541): at >> > com.android.internal.util.XmlUtils.readThisMapXml(XmlUtils.java:521) >> > W/ApplicationContext( 1541): at >> > com.android.internal.util.XmlUtils.readThisValueXml(XmlUtils.java:733) >> > W/ApplicationContext( 1541): at >> > com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:667) >> > W/ApplicationContext( 1541): at >> > com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:470) >> > W/ApplicationContext( 1541): at >> > android.app.ContextImpl.getSharedPreferences(ContextImpl.java:376) >> > W/ApplicationContext( 1541): at >> > android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java: >> > 146) >> > W/ApplicationContext( 1541): at >> > net.robmunro.mypod.WelcomeActivity.onEWCreate(WelcomeActivity.java: >> > 160) >> > W/ApplicationContext( 1541): at >> > net.robmunro.mypod.AbstractEWActivity.onCreate(AbstractEWActivity.java: >> > 25) >> > W/ApplicationContext( 1541): at >> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: >> > 1047) >> > W/ApplicationContext( 1541): at >> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java: >> > 1611) >> > W/ApplicationContext( 1541): at >> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: >> > 1663) >> > W/ApplicationContext( 1541): at android.app.ActivityThread.access >> > $1500(ActivityThread.java:117) >> > W/ApplicationContext( 1541): at android.app.ActivityThread >> > $H.handleMessage(ActivityThread.java:931) >> > W/ApplicationContext( 1541): at >> > android.os.Handler.dispatchMessage(Handler.java:99) >> > W/ApplicationContext( 1541): at android.os.Looper.loop(Looper.java: >> > 123) >> > W/ApplicationContext( 1541): at >> > android.app.ActivityThread.main(ActivityThread.java:3683) >> > W/ApplicationContext( 1541): at >> > java.lang.reflect.Method.invokeNative(Native Method) >> > W/ApplicationContext( 1541): at >> > java.lang.reflect.Method.invoke(Method.java:507) >> > W/ApplicationContext( 1541): at com.android.internal.os.ZygoteInit >> > $MethodAndArgsCaller.run(ZygoteInit.java:839) >> > W/ApplicationContext( 1541): at >> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) >> > W/ApplicationContext( 1541): at dalvik.system.NativeStart.main(Native >> > Method) > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en