不能在Picasso库中使用任何方法

问题描述 投票:0回答:2

所以我在我的Android项目中添加了这个依赖项:

implementation ('com.squareup.picasso:picasso:2.71828') {
    exclude group: 'com.android.support'
    exclude module: ['exifinterface', 'support-annotations']
}

我无法在毕加索中调用任何方法。在我的代码中将.放入Picasso(点)之后我能看到的就是这些

enter image description here

然而,我然后创建了一个全新的Android项目,然后尝试使用Picasso,它起作用了。我不知道现在的问题是什么。另外,请在评论中提及我是否需要提供有关我的项目的更多信息,例如我的build.gradle文件。

谢谢!

android dependencies picasso
2个回答
0
投票

如果清理,重建或无效缓存并重新启动对您没有帮助,您可以使用Glide库。在附加链接中查找Glide:qazxsw poi


0
投票

我犯了一个愚蠢的错误。我试图在我的Activity类中调用Picasso方法,但是在类的所有方法之外。然后我调用了https://github.com/bumptech/glide方法中的方法。我希望这个答案可以帮助那些犯同样错误的人。

© www.soinside.com 2019 - 2024. All rights reserved.