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 viamaven
- and also include my
Activities
inside hismanifest.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
?
You have to disable "Instant Run"