这个方法被弃用了怎么解决 我在百度上看到是用math来替代 但是Match.sqrt返回的是double类型不能强转成float啊
欢迎选择我的课程,让我们一起见证您的进步~~
http://stackoverflow.com/questions/32065160/method-floatmath-sqrt-not-foundhttp://bbs.mob.com/thread-17165-1-1.htmlAnswer Everyone said it should be changed to:
(float)Math.sqrt(...)
Give me a solution that is not particularly good, but can solve the problem:
Double.valueOf(Math.sqrt(4.0)).floatValue();
You select the deprecated method and press F3 to see what the deprecated method is replaced with
Although it is not completely related, but also mention ithttps://github.com/android-cn/android-discuss/issues/291
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:
Give me a solution that is not particularly good, but can solve the problem:
You select the deprecated method and press F3 to see what the deprecated method is replaced with
Although it is not completely related, but also mention it
https://github.com/android-cn/android-discuss/issues/291