Android:找不到类"Picasso"在路径上:DexPathList(以下各项的失败分辨率:Picasso) [英] Android: Didn't find class "Picasso" on path: DexPathList (Failed resolution of: Picasso)

查看:352
本文介绍了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 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?

推荐答案

您必须禁用即时运行"

You have to disable "Instant Run"

这篇关于Android:找不到类"Picasso"在路径上:DexPathList(以下各项的失败分辨率:Picasso)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆