Scenery:
public void metodoX(Double valor) {
DecimalFormat df = new DecimalFormat("0.00");
String valorRound = df.format(valor);
Double valorRound2 = Double.parseDouble(valorRound);
...
}
Error:
Caused by: java.lang.NumberFormatException: Invalid double: "3,67"
Error line:
Double valorRound2 = Double.parseDouble(valorRound);
Details:
The app is rodando perfeitamente no emulador API 23
, but running in celular API 23, causa esse erro
.
Why only the phone gives the error?
I've tried:
Double valorRound2 = Double.valueOf(valorRound);