I downloaded the Picasso image cache library and tried to get the sample code to work. I set up an Android project from the existing code, included the picasso-2.2.0.jar and android-support-v4.jar
However, when I tried to compile and run it, it says there are errors in the PicassoSampleAdapter and SampleWidgetProvider files.
This is the line in question:
picasso.load(Data.URLS[new Random().nextInt(Data.URLS.length)]) //
.placeholder(R.drawable.placeholder) //
.error(R.drawable.error) //
.transform(new GrayscaleTransformation(picasso)) //
.into(updateViews, R.id.image, appWidgetIds);
And this is the error:
The method into(ImageView, Callback) in the type RequestCreator is not applicable for the arguments (RemoteViews, int, int[])
I checked the documentation on the picasso website and indeed, into takes those two parameters. It seems inconceivable to me that there'd be an error like this on such a great library, so I'm thinking it must be something I'm not doing right when setting this up? The other files do not have errors in them, so I believe I've set things up right.
Can anyone help? Do you have the same error when you try to set up the sample project and run it?