PullToRefreshWebView:can't find referenced method 'float floor(float)' in library class android.util
2017-06-08 09:48
513 查看
转载或引用请注明出处,谢谢!http://blog.csdn.net/wj9966
使用张鸿洋大神的 PullToRefresh,很好用,但是打包的时候报错PullToRefreshWebView:can't
find referenced method 'float floor(float)' in library class android.util
使用PullToRefresh库方法:
在build.gradle中添加
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.
解决办法
在项目中混淆时添加:
转载或引用请注明出处,谢谢!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.FloatMathWarning: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
相关文章推荐
- android6.0 PullToRefreshWebView中的FloatMath.floor()不能用了如何替换
- android6.0 PullToRefreshWebView中的FloatMath.floor()不能用了如何替换
- Warning: can't find referenced field/method '...' in library class ...
- [Android]Android Studio导入第三方工程库,以PullToRefreshViewLibrary为例
- Android PullToRefresh 下拉刷新,上拉很多其它,支持ScrollView,ListView,可方便拓展GridView,WebView等
- Android PullToRefresh 下拉刷新,上拉更多,支持ScrollView,ListView,可方便拓展GridView,WebView等
- Android之PullToRefresh(ListView 、GridView 、WebView)使用详解和总结
- android 研究xmpp asmack 时常见报错java.lang.VerifyError;VFY: unable to find class referenced in signature
- 使用 android-Ultra-Pull-To-Refresh 实现 WebView 下拉刷新
- can't call void android.view.View.setElevation(float) on null obj in call to CallVoidMethodV
- Android - Failed to find provider info for com.google.settings in MapView Example
- Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方案
- java.lang.IllegalStateException: Could not find a method capture(View) in the activity class
- Android代码混淆第三方jar,can't find referenced class的解决
- Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方案
- Could not find a method XXX(View) in the activity class
- can t find dynamically referenced class android os systemproperties
- 《android》下拉刷新上拉加载更多控件 PullToRefreshView
- Eclipse打包Android混淆代码降低代码可读性时,出现的Warning:can't find referenced class问题的解决方案
- android.content.ActivityNotFoundException: Unable to find explicit activity class {...}; have you declared this activity in your AndroidManifest.xml?