问题描述
我在android应用程序中遇到一个问题,我正在尝试检查现有的应用程序,该应用程序包含
i'm getting one issue in android app, I am trying to check already existing app, the app contains
implementation('com.squareup.picasso:picasso:3.0.0-SNAPSHOT') {
exclude group: 'com.android.support'
}
毕加索图书馆和
在类中使用该库,下面是代码
using that library in a class, here is the code
import com.squareup.picasso.Picasso;
Picasso.with().load(url).placeholder(R.drawable.default_pic).into(imageView);
这是错误Error:(49, 20) error: cannot find symbol method with()
并且我的android studio版本是3.0 RC1,这是一个问题吗?
and my android studio version is 3.0 RC1, is this is an issue ?
推荐答案
在最新的Picasso快照中,您正在使用方法with
尚未重命名为get
,请参见此处的相关提交: https://github.com/square/picasso/commit/e7e919232fe2b15772a7fcd9e15ead2304c66fae
It looks like in the latest Picasso Snapshot that you are using the method with
hast been renamed to get
see related commit here: https://github.com/square/picasso/commit/e7e919232fe2b15772a7fcd9e15ead2304c66fae
,所以将with()
替换为get()
,应该可以.
so replace with()
with get()
and should work.
由于您使用的是尚未正式发布的版本,因此尚无发行说明,并且可能会出现类似的令人惊讶的现象;-)
Since you are using a not yet officially released version, there are no release notes yet, and surprizes like that can happen ;-)
BTW:对我来说,这似乎是个好名字,因为一个名为"with"但没有参数的方法有点奇怪:-P
BTW: It seems to be a good name change to me, since a method named "with" but without parameter was a bit weird :-P
这篇关于使用毕加索库android找不到带有()的符号方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!