This problem bothered me; I found that logcat warnings come from android:defaultValue , not the <item> entries in the array. You can resolve these messages by creating string entries in an XML file (I use /xml/constants.xml, but the naming convention is up to you and does not matter) as follows:
<resources> <string name="someValueA">12345</string> <string name="someValueB">0</string> <string name="someValueC">6789</string> </resources>
Although these values ββare integers, since you declare them as strings, Android treats them as strings, so the logcat warning is not generated.
In your code, specify the link @string/someValueA or R.string.someValueA (or B, or C, etc.) depending on the situation wherever you place these values. In the case of ListPreference in the xml file, you should use something like this:
<ListPreference android:defaultValue="@string/someValueA" android:dialogTitle="Some dialog title" android:entries="@array/someNamesA" android:entryValues="@array/someValuesA" android:key="some_preference" android:summary="Your summary text" android:title="Some Title" />
Once you find the entries that cause the problem, don't be scared to solve it. The conversion of the "d" values ββin logcat messages from hexadecimal to decimal should be pointed in the right direction. For example, 0x5a0 - 1440, so you must determine where you used the value 1440 in your code.
mike47 Feb 20 '14 at 23:54 2014-02-20 23:54
source share