SmartRefreshLayout icon indicating copy to clipboard operation
SmartRefreshLayout copied to clipboard

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

Open danielsmarantz opened this issue 5 years ago • 1 comments

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 :)

danielsmarantz avatar Dec 07 '20 20:12 danielsmarantz

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

fengruiyu avatar Mar 19 '24 03:03 fengruiyu