这个方法被弃用了
怎么解决
我在百度上看到是用math来替代 但是Match.sqrt返回的是double类型不能强转成float啊
高洛峰2017-04-17 15:05:20
http://stackoverflow.com/questions/32065160/method-floatmath-sqrt-not-found
http://bbs.mob.com/thread-17165-1-1.html
Answer Everyone said it should be changed to:
(float)Math.sqrt(...)
PHP中文网2017-04-17 15:05:20
Give me a solution that is not particularly good, but can solve the problem:
Double.valueOf(Math.sqrt(4.0)).floatValue();
巴扎黑2017-04-17 15:05:20
You select the deprecated method and press F3 to see what the deprecated method is replaced with
高洛峰2017-04-17 15:05:20
Although it is not completely related, but also mention it
https://github.com/android-cn/android-discuss/issues/291