Hi hopefully this fulfils the criteria for being a well written question. I'm new to programming and I've been trying to write an application for climbers on android that tells the user what they should be climbing based on their current ability for a training period. The app requires the user to input their climbing ability and the length of their wall.
I've set up a preferences menu using SharedPrefences
for this with a numeric edit text field and a list.
Initially I had an class cast exception as I was trying to use the string from the edit text as a float/double/int (I tried all three!).
I've converted the string to a double using Double = Double.valueof(StringFromPrefernce)
which solved that error but is now producing the error java.util.FormatFlagsConversionMismatchException: %o does not support ' '
which I've not been able to find a solution for.
The app allows the user to access the preference menu initially, however once they have set some values any attempt to access the preference menu will produce this force close.
SOLUTION:
In my preferences.xml I had referenced a string. That string contained a % symbol which was responsible for the force close. Removing the % symbol fixed the issue.
i was getting that because i was using a tool to do automatic translations. it was putting in % s
instead of %s
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With