Hi,
Your answers helped fix the problem but the solution is a little weird, at
least according to me.
Apparently the app force closes when arrays.xml is:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="update_freq_options">
<item>Every Minute</item>
<item>5 minutes</item>
<item>10 minutes</item>
<item>15 minutes</item>
<item>Every Hour</item>
</string-array>
<string-array name="magnitude">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>
<string-array name="magnitude_options">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>
<string-array name="update_freq_values">
<item>1</item>
<item>5</item>
<item>10</item>
<item>15</item>
<item>60</item>
</string-array>
</resources>
But if arrays.xml is changed to:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="update_freq_options">
<item>Every Minute</item>
<item>5 minutes</item>
<item>10 minutes</item>
<item>15 minutes</item>
<item>Every Hour</item>
</string-array>
<string-array name="magnitude">
<item>3</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>
<string-array name="magnitude_options">
<item>3</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>
<string-array name="update_freq_values">
<item>1</item>
<item>5</item>
<item>10</item>
<item>15</item>
<item>60</item>
</string-array>
</resources>
It works fine. How can a set of 3 more options change the working of the app
so drastically? If you could point me as to how to keep those previous
options in my app I would be grateful as they are magnitude filtering for
earthquakes.
Thanks
On Sun, Jun 26, 2011 at 11:59 PM, TreKing <[email protected]> wrote:
> This is what you look for ..."Cause by" ... in your LogCat.
>
> On Sun, Jun 26, 2011 at 1:18 PM, Raghav Sood <[email protected]> wrote:
>
>> Caused by: java.lang.ClassCastException: java.lang.Integer
>> at
>> android.app.ContextImpl$SharedPreferencesImpl.getString(ContextImpl.java:2754)
>
>
> This tells you you are trying to cast something to an Integer and it's
> failing. Look up the call stack to find the point at which your code does
> the call into the preferences. Put a break point there, then debug your app
> to find what values you are sending / trying to get from the preference to
> get the bad value.
>
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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-developers?hl=en
>
--
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/
http://www.telstop.tel/
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en