ClassNotFoundException “android.support.v4.graphics.drawable.DrawableWrapper”

前端 未结 8 1482
温柔的废话
温柔的废话 2020-12-20 19:10

What can cause this error for class DrawableWrapper from the support lib?

Caused by: java.lang.ClassNotFoundException: Didn\'t find class 
\"and         


        
8条回答
  •  生来不讨喜
    2020-12-20 19:55

    In my case, I used support library version '27.0.2' for my project. It was working perfectly. However, when I copy & paste the project to different location and I opened in Android studio. That time, android studio added below line in build.gradle (path: MyProject/app/build.gradle)

    compile 'com.android.support:support-v4:27.1.1'

    Then I got the below exception.

    Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.graphics.drawable.DrawableWrapper" on path: DexPathList

    I removed the line from build.gradle (MyProject/app/build.gradle). Now it is working fine.

提交回复
热议问题