8

I updated my android studio to 2.1.2 and opened previous project.Now it shows that FloatMath.sqrt() is deprecated and cannot resolve method 'sqrt(float)'

Gurjit Singh
  • 1,060
  • 2
  • 13
  • 16

1 Answers1

42

Just type cast it with float as -

(float)Math.sqrt(...)

FloatMath is deprecated in API 22

Reference link - https://developer.android.com/reference/android/util/FloatMath.html

Onkar Nene
  • 1,359
  • 1
  • 17
  • 23