Caused by: java.lang.ClassNotFoundException: Didn't find class "com.scwang.smartrefresh.layout.SmartRefreshLayout" on path: DexPathList[[zip file

brc7rcf0  于 5个月前  发布在  Java
关注(0)|答案(1)|浏览(125)

SmartRefreshLayout class is not found when i try to use the custom view in the xml layout. Most likely an android x issue.

Caused by: java.lang.ClassNotFoundException: com.scwang.smartrefresh.layout.SmartRefreshLayout
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:454)
        at android.view.LayoutInflater.createView(LayoutInflater.java:815)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:659)

The sample app is not implemented the same way as the setup instructions. Would be very helpful to have the sample app support android x. Otherwise it will be further and further out of date. Thanks and the pull to refresh components are impressive, hope i can use one day :)

x33g5p2x

x33g5p2x1#

如果使用 AndroidX 先在 gradle.properties 中添加,两行都不能少
android.useAndroidX=true
android.enableJetifier=true

相关问题