Android: Didn't find class “Picasso” on path: DexPathList (Failed resolution of: Picasso)

元气小坏坏 提交于 2019-12-07 13:57:33

问题


First of all I know this error has been asked already but my case is a little different:

I'm distributing SDK (Android library project). My SDK needs among others things (play services, support v4, gson jars etc.) Picasso so I have in my gradle.build:

compile 'com.squareup.picasso:picasso:2.5.2'

Now when I test importing the resulted aar file from this library project to my sample app - all works fine.

The problem is that my customer when importing the aar file into his app project, trying to launch inside his app the Activity related with my SDK functionality getting the above error:

Failed resolution of: Lcom/squareup/picasso/Picasso:
java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.Picasso" on path: DexPathList[[zip file "/data/app/com.package.name-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

Note: I do need inside this Activity Picasso. We both use Android studio.

My question is where is the problem? Inside my library? In the way the customer integrates the aar?

  • The customers needs to modify his build.gradle with all my SDK's dependencies because I'm not distributing via maven
  • and also include my Activities inside his manifest.xml
  • Maybe the multidex has something to do here?
  • Maybe version of play services?
  • Maybe version of support lib V4 VS. appcompat V7?
  • Collusion in dependencies versions between what the customer compiled and what I compiled?
  • Order of dependencies in the gradle.build?

回答1:


You have to disable "Instant Run"



来源:https://stackoverflow.com/questions/33831340/android-didnt-find-class-picasso-on-path-dexpathlist-failed-resolution-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!