Android:找不到类"Picasso"在路径上:DexPathList(以下各项的失败分辨率:Picasso)
首先,我知道此错误已被提出,但我情况有些不同:
First of all I know this error has been asked already but my case is a little different:
我正在分发SDK(Android库项目).我的SDK需要其他东西(播放服务,支持v4,gson jar等),所以我在gradle.build
中:
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'
现在,当我测试将结果aar
文件从该库项目导入到示例应用程序时-一切正常.
Now when I test importing the resulted aar
file from this library project to my sample app - all works fine.
问题是我的客户在将aar
文件导入到他的应用程序项目中时,试图在他的应用程序中启动与我的SDK功能相关的Activity
,并出现上述错误:
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]]
注意:我确实需要在此Activity
毕加索内.我们俩都使用Android Studio.
Note: I do need inside this Activity
Picasso. We both use Android studio.
我的问题是问题出在哪里?在我的图书馆里面?客户以何种方式集成aar
?
My question is where is the problem? Inside my library? In the way the customer integrates the aar
?
- 客户需要使用我的所有SDK依赖项来修改其
build.gradle
,因为我不是通过maven
进行分发
- ,还将我的
Activities
包含在他的manifest.xml
中
- 也许
multidex
在这里有事吗? - 也许是
play services
的版本? - 也许是
support lib V4
VS的版本.appcompat V7
? - 在客户编译的内容和我编译的内容之间的依赖关系版本中相互勾结?
-
gradle.build
中的依存关系顺序?
- 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"