-
Notifications
You must be signed in to change notification settings - Fork 4k
Not working with api 23. FloatMath is deprecated. use Math instead. #366
Comments
Same here! I hope for a quick fix. In the meantime, is there any workaround? |
If you look at the source for FloatMath, it is just doing this: |
Same here... |
bump |
+1 |
For me the current solution is to add the following line to my proguard file: |
If you are not using the Line style indicator then @maxandron's answer works |
I am getting the same error for API 23 . All functions were removed! |
Same here. |
Fixed in this PR: #370 just needs a merge & release |
+1 |
1 similar comment
+1 |
You can make use of this (float)Math.sqrt(...) |
+1 |
+1 |
looking forward to a fix/ merge of the fix + release |
+1 |
I already mentioned make use of (float)Math.sqrt(...).it will work for you sure.I did it and worked well for me |
@trinadhkoya I actually don't need to use that function, but proguard complains about that when I build the release version and I don't know if the library itself use that function somewhere and may cause some run-time exception |
Sorry @antonio
|
+1 |
A more targeted workaround is to add to proguard: |
+1 |
Thanks @lorenzopolidori, your suggestion may temporarily hide the problem from the build server log but it doesn't actually solved it as suggested here. Nobody wants that in "a shiny day close to the release the app breaks because of some deprecated method which disappears from the lib" :-) |
@AntonioCappiello Yes, I agree. The workaround I suggested is just to make a build successful until one of the proposed PR's is accepted and merged into the project (which should happen asap I think). |
+1 |
2 similar comments
+1 |
+1 |
+1 |
1 similar comment
+1 |
Hey guys! I have tried this solution. It works correctly. |
Hi Mostafa, it is what I did in the PR connected to this issue (#385) but it was not merged yet. Probably you haven't read the other comments above. I don't use that function, but the library does. So the warning is not in my code, but in the library. I don't have anything to replace in my code. |
Hi Antonio. And as a friendly offer, just give up working with eclipse and start working with android studio. you will love it. |
Ignore my pervious answer.I thought it has a jar file. I will make a video to show you how you can solve the problem and I will put the video link here . |
ahah did I ever mentioned that I use Eclipse? |
Watch this video. |
@MostafaSh Why do you include libraries in your project in such "old-fashion" way instead of using a "compile" in gradle pointing to maven/jcenter repo? If the library get updated (bug fixes, improvements, deletion of deprecated methods) then you don't get any of those updates in your way. |
Actually I'm new in android studio. Thank you for this information about using maven. I don't know anything about that. |
I'm looking for more information about using maven.that would be kind of you if you get me more information. |
Hi everyone, I made a fork of ViewPagerIndicator which is compiled via Gradle (thus you can use JitPack) and uses It solved my problem, let me know if it works for you too :) |
I published here my solution. It is original Jake's repo with one more additional commit with this fix. Usage:
|
+1 |
1 similar comment
+1 |
@yakubbaev , @luongbeta2 This repo is not longer supported. There is no chance Jake will fix it and publish. I recommend to use my solution. |
thanks |
👍 |
And if you're a |
+1 |
+1 |
com.viewpagerindicator.LinePageIndicator: can't find referenced method 'float ceil(float)' in library class android.util.FloatMath
The text was updated successfully, but these errors were encountered: