[Solved] How to avoid number format exception in android while converting string into long?


This is because the data at myData[7] or myData[8] isn’t containing a parsable long value. Either debug or include logs to find the incorrect value and correct it.

Use double instead.

double latitude  = Double.valueOf(myData[7]);

0

solved How to avoid number format exception in android while converting string into long?