You can't directly store string in float. so you have to parse string or convertit into float.see this methodparseFloat(String s)this is of string class and return float representation of the string you'regetting.