For me, the problem was that one of my library projects was using v13 of the support library: android-support-v13.jar.
So look out for a message like this in your logs:
Found both android-support-v4 and android-support-v13 in the dependency list.
Because v13 includes v4, using only v13.
If you see that warning, make sure your library project also includes the latest support library, otherwise your v4 library might get superseded by an old v13 library
(which obviously does not include the new SwipeRefreshLayout).
可能是你的工程下同时存在
android-support-v13和v4,v4会被旧版的v13替代掉,而旧版的v13没有SwipeRefreshLayout!!!
解决办法:直接移除v13~大功告成 太坑人了!

本文解决了一个常见的Android开发问题,即当使用android-support-v13库时遇到与v4库的版本冲突,导致SwipeRefreshLayout无法正常使用的情况。文章提供了具体的解决方案,即确保项目中只使用最新版本的支持库,避免功能缺失。
729

被折叠的 条评论
为什么被折叠?



