I'm new to Android so please, explain me, how to use BigDecimal in API level 16, because using this line:
BigDecimal currentNumber = new BigDecimal(String "0.0");
results in an error, Call requires api level 24.
I'm new to Android so please, explain me, how to use BigDecimal in API level 16, because using this line:
BigDecimal currentNumber = new BigDecimal(String "0.0");
results in an error, Call requires api level 24.
import this
java.math.BigDecima(Added in API 1)
instead of this
android.icu.math.BigDecimal(Added in API 24)
you are constructing the object wrong... BigDecimal is available since API1
you need to do:
BigDecimal currentNumber = new BigDecimal("0.0");
Note that I removed the unnecessary String Class just pass the value between quotes...