ClassNotFoundException “android.support.v4.graphic

2019-02-22 05:12发布

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

Caused by: java.lang.ClassNotFoundException: Didn't find class 
"android.support.v4.graphics.drawable.DrawableWrapper" on path: 
DexPathList[[zip file "/data/app/com.example.banyan.tasty-
1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

8条回答
beautiful°
2楼-- · 2019-02-22 06:02

i fixed same error updating version

implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'

To

implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
查看更多
家丑人穷心不美
3楼-- · 2019-02-22 06:03

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.

查看更多
登录 后发表回答