PullToRefreshWebView:can't find referenced method 'float floor(float)' in library class android.util

转载或引用请注明出处,谢谢!http://blog.csdn.net/wj9966

使用张鸿洋大神的 PullToRefresh,很好用,但是打包的时候报错PullToRefreshWebView:can't find referenced method 'float floor(float)' in library class android.util


使用PullToRefresh库方法:

在build.gradle中添加

compile 'com.github.userswlwork:pull-to-refresh:1.0.0'

具体错误

Warning:com.handmark.pulltorefresh.library.PullToRefreshWebView: can't find referenced method 'float floor(float)' in library class android.util.FloatMath
Warning:com.handmark.pulltorefresh.library.PullToRefreshWebView$InternalWebViewSDK9: can't find referenced method 'float floor(float)' in library class android.util.FloatMath
Warning:there were 2 unresolved references to library class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.


出现原因

PullToRefreshWebView中使用FloatMath.floor()来转换数据

    protected boolean isReadyForPullEnd() {
        float exactContentHeight = FloatMath.floor((float)((WebView)this.mRefreshableView).getContentHeight() * ((WebView)this.mRefreshableView).getScale());
        return (float)((WebView)this.mRefreshableView).getScrollY() >= exactContentHeight - (float)((WebView)this.mRefreshableView).getHeight();
    }




解决办法

在项目中混淆时添加:

-dontwarn com.handmark.**
-keep class org.openudid.** { *; }





                                                                                        转载或引用请注明出处,谢谢!http://blog.csdn.net/wj9966


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

摩羯座程序媛

打赏的老板越来越富

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值