Android Question Invalid double:""

Yves Mazzon

Member
Licensed User
Longtime User
In my application when run on my Samsung S4 I get this message: "An error has occurred in sub:main_calculation(java line:523) Java.lang. numberFormatExeption: Invalid double:"". "

I am at lost here. I know that I have a sub that is called Calculation but reading my code again and again can't find what is triggering the error.

My question is what shall I look for: Basically in my Calculation sub, numerical values are transferred to declared variables and then some math are performed. Many thanks
Yves
 

LucaMs

Expert
Licensed User
Longtime User
sfera_cristallo.jpg


Anywhere Software, can I answer so each time a question is not specified enough? :)
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
This is most likely caused by your app trying to parse user input into a numerical variable (like a Double) but that input not being numerical in nature. Look at how your app validates user input.
 
Upvote 0

Yves Mazzon

Member
Licensed User
Longtime User
Hi, I fond where the error came from. I got that error if the string is empty in the labels where the numerical values has to be entered. So I put some condition to avoid this error by putting some guards in the program. Many thanks.
 
Upvote 0
Top