user8616404
user8616404

Reputation:

Android Picasso different errors

I am trying to get image from web and put it into ImageView, but Picasso keeps showing errors.. when I refresh androidStudio, it shows another errors.. I looked up for solutions, but there is no relevant up-to-date post anywhere. If anyone has any idea how to solve it, please comment.

Error: Program type already present: com.squareup.picasso.Action
Error: Program type already present: 
com.squareup.picasso.Callback$EmptyCallback

Dependencies:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint- 
layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 
'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.squareup.picasso:picasso:2.5.2'
}

Picasso:

Picasso.with(About.this).load(photo).into(myImageView, new Callback() {
        @Override public void onSuccess() {
            Log.d("Debug", "Picasso Success");
        }

        @Override public void onError() {
            Log.d("Debug", "Picasso Errored");
        }
    });

String photo:

 String photo = getIntent().getExtras().getString("photo");

Upvotes: 0

Views: 323

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76849

try to update to implementation "com.squareup.picasso:picasso:2.71828"

the duplicate entry program type already present can only come from another library or another module. most likely, there is a unnecessary picasso .jar in the libs directory, which ot delete.

Upvotes: 1

Related Questions