Android – Invalid double “#,##”… here is a solution to the problem.
Android – Invalid double “#,##”
Users of my app get an error and the app crashes
I read the report, it says
Caused: java.lang.NumberFormatException: invalid double: “1,36”
I have
copied the entered data in my application and I have no problem at all
I
even asked her to send me her database so I could import accurate data and it was still fine for me
I’m confused about where double is formatted because I don’t see anything in my code that can be used to format ,
Any suggestions for what happened?
Solution
The easy way is (do it on top of your parce):
if (str.contains(",")) {
str.replace(",",".");
}