Android throwing weird exception while using SharedPreferences
<p>can someone please help, I have been struggling with this piece of android code. It keeps throwing exceptions.    </p>

<pre><code>    try
    {
        SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getBaseContext());//getPreferences(Context.MODE_PRIVATE);
        String str = sharedPref.getString(MainActivity.APP_DATA_KEY, "");
        _appData = FemChoiceAppData.deserialize(str);

        if (_appData == null)
            throw new Exception();
    } catch (Exception e)
    {
        Calendar cl = Calendar.getInstance(TimeZone.getDefault());
        int year = cl.get(Calendar.YEAR);
        int month = cl.get(Calendar.MONTH);
        int day = cl.get(Calendar.DAY_OF_MONTH);
        cl.set(year, month, day, 0, 0, 0);

        _appData = new FemChoiceAppData();
        _appData.CurrentMonth = Calendar.getInstance(TimeZone.getDefault());
        _appData.CurrentMonth.set(year, month, 1, 0, 0, 0);

        _appData.CurrentSettings = new FemChoiceSettings(cl.getTime(), 26, 6);
    }

    yearTV.setText(_appData.CurrentSettings.getStartDate().getYear());
    monthTV.setText(_appData.CurrentSettings.getStartDate().getMonth());
    dayTV.setText(_appData.CurrentSettings.getStartDate().getDay());
</code></pre>

<p>THIS IS THE EXCEPTION IT THROWS</p>

<pre><code>  04-16 22:54:19.251: E/AndroidRuntime(2063): FATAL EXCEPTION: main
    04-16 22:54:19.251: E/AndroidRuntime(2063): java.lang.RuntimeException: Unable to start activity ComponentInfo{com../com...Settings}: android.content.res.Resources$NotFoundException: String resource ID #0x71
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.os.Handler.dispatchMessage(Handler.java:99)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.os.Looper.loop(Looper.java:130)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread.main(ActivityThread.java:3687)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at java.lang.reflect.Method.invokeNative(Native Method)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at java.lang.reflect.Method.invoke(Method.java:507)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at dalvik.system.NativeStart.main(Native Method)
    04-16 22:54:19.251: E/AndroidRuntime(2063): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x71
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.content.res.Resources.getText(Resources.java:201)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.widget.TextView.setText(TextView.java:2923)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at com...Settings.loadAppData(Settings.java:92)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at com...Settings.setup(Settings.java:64)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at com...Settings.onStart(Settings.java:49)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.Activity.performStart(Activity.java:3791)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1624)
    04-16 22:54:19.251: E/AndroidRuntime(2063):     ... 11 more
</code></pre>
