ChuckerTeam / chucker

🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
Apache License 2.0
3.97k stars 351 forks source link

Duplicate class com.chuckerteam.chucker.api.Chucker found in modules jetified-library-4.0.0-runtime #1223

Closed rizwanspare8 closed 6 months ago

rizwanspare8 commented 6 months ago

:writing_hand: Describe the bug

after adding the third party Sdk( phonepe sdk) in my existing project i am getting this error while running the code in Android Studio

See error

:wrench: Expected behavior

Duplicate class com.chuckerteam.chucker.api.Chucker found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2) Duplicate class com.chuckerteam.chucker.api.ChuckerCollector found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2) Duplicate class com.chuckerteam.chucker.api.ChuckerInterceptor found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2) Duplicate class com.chuckerteam.chucker.api.ChuckerInterceptor$Builder found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2) Duplicate class com.chuckerteam.chucker.api.RetentionManager found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2) Duplicate class com.chuckerteam.chucker.api.RetentionManager$Period found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2)

Go to the documentation to learn how to Fix dependency resolution errors.

cortinico commented 6 months ago

That's happening because you added Chucker "twice".

Duplicate class com.chuckerteam.chucker.api.Chucker found in modules jetified-library-4.0.0-runtime (com.github.chuckerteam.chucker:library:4.0.0) and jetified-library-no-op-3.5.2-runtime (com.github.chuckerteam.chucker:library-no-op:3.5.2)

Not sure why without looking at your project.

rizwanspare8 commented 6 months ago

I have added chuker dependecy single time in my project , this error comes when i add phonepe (indian payment sdk)sdk when i remove phonepe sdk then chuker lib is working fine

cortinico commented 6 months ago

this error comes when i add phonepe (indian payment sdk)sdk when i remove phonepe sdk then chuker lib is working fine

You should open this issue against phonepe sdk then

ARPIT2208 commented 5 months ago

Hi @rizwanspare8 did you get any solution ? i am also facing same issue.

rizwanspare8 commented 5 months ago

Hi @rizwanspare8 did you get any solution ? i am also facing same issue. you have to exclude chuker dependency from your sdk like this implementation(libs.phonepe.sdk) { exclude group: 'com.github.chuckerteam.chucker', module: 'library-no-op' }