Program type already present JsonElement, android?











up vote
0
down vote

favorite












I integrated retrofit and dagger into one of my old projects. I am getting this error when I try to run it.



Program type already present: com.google.gson.JsonElement
Message{kind=ERROR, text=Program type already present: com.google.gson.JsonElement, sources=[Unknown source file], tool name=Optional.of(D8)}


This is my build gradle file



dependencies {
implementation fileTree(include: '*.jar', dir: 'libs')

implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
transitive = true
}

// Appflyers Lib
api 'com.appsflyer:af-android-sdk:4.8.3'

// Facebook SDK
api 'com.facebook.android:facebook-android-sdk:4.36.0'

// Support Lib
api 'com.android.support:multidex:1.0.3'
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:mediarouter-v7:27.1.1'
api 'com.android.support:design:27.1.1'
api 'com.android.support:customtabs:27.1.1'
api 'com.android.support:support-v13:27.1.1'
api 'com.android.support:recyclerview-v7:27.1.1'
api 'com.android.support:cardview-v7:27.1.1'

//Play Service Lib
api 'com.google.android.gms:play-services-cast:16.0.2'
api 'com.google.android.gms:play-services-plus:15.0.1'
api 'com.google.android.gms:play-services-identity:15.0.1'
api 'com.google.android.gms:play-services-base:15.0.1'
api 'com.google.android.gms:play-services-gcm:15.0.1'
api 'com.google.android.gms:play-services-auth:16.0.0'
api 'com.google.android.gms:play-services-ads:15.0.1'
api 'com.google.android.gms:play-services-analytics:16.0.3'

//Firbase Service Lib
api 'com.google.firebase:firebase-core:16.0.3'


api 'com.github.bumptech.glide:glide:4.7.1'
api 'com.android.volley:volley:1.1.0'
api 'com.google.android.gms:play-services-cast-framework:16.0.2'
api 'com.github.amlcurran.showcaseview:library:5.4.3'



api 'com.android.support:percent:27.1.1'
api 'com.apptentive:apptentive-android:4.1.2'
api 'com.urbanairship.android:urbanairship-sdk:8.9.6'

implementation project(':library')
implementation project(':swipelistlibrary')
implementation project(':exo_player_library')

implementation 'com.google.dagger:dagger:2.16'
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

}


Can some one point me how can I fix this issue?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I integrated retrofit and dagger into one of my old projects. I am getting this error when I try to run it.



    Program type already present: com.google.gson.JsonElement
    Message{kind=ERROR, text=Program type already present: com.google.gson.JsonElement, sources=[Unknown source file], tool name=Optional.of(D8)}


    This is my build gradle file



    dependencies {
    implementation fileTree(include: '*.jar', dir: 'libs')

    implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
    transitive = true
    }

    // Appflyers Lib
    api 'com.appsflyer:af-android-sdk:4.8.3'

    // Facebook SDK
    api 'com.facebook.android:facebook-android-sdk:4.36.0'

    // Support Lib
    api 'com.android.support:multidex:1.0.3'
    api 'com.android.support:appcompat-v7:27.1.1'
    api 'com.android.support:mediarouter-v7:27.1.1'
    api 'com.android.support:design:27.1.1'
    api 'com.android.support:customtabs:27.1.1'
    api 'com.android.support:support-v13:27.1.1'
    api 'com.android.support:recyclerview-v7:27.1.1'
    api 'com.android.support:cardview-v7:27.1.1'

    //Play Service Lib
    api 'com.google.android.gms:play-services-cast:16.0.2'
    api 'com.google.android.gms:play-services-plus:15.0.1'
    api 'com.google.android.gms:play-services-identity:15.0.1'
    api 'com.google.android.gms:play-services-base:15.0.1'
    api 'com.google.android.gms:play-services-gcm:15.0.1'
    api 'com.google.android.gms:play-services-auth:16.0.0'
    api 'com.google.android.gms:play-services-ads:15.0.1'
    api 'com.google.android.gms:play-services-analytics:16.0.3'

    //Firbase Service Lib
    api 'com.google.firebase:firebase-core:16.0.3'


    api 'com.github.bumptech.glide:glide:4.7.1'
    api 'com.android.volley:volley:1.1.0'
    api 'com.google.android.gms:play-services-cast-framework:16.0.2'
    api 'com.github.amlcurran.showcaseview:library:5.4.3'



    api 'com.android.support:percent:27.1.1'
    api 'com.apptentive:apptentive-android:4.1.2'
    api 'com.urbanairship.android:urbanairship-sdk:8.9.6'

    implementation project(':library')
    implementation project(':swipelistlibrary')
    implementation project(':exo_player_library')

    implementation 'com.google.dagger:dagger:2.16'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

    }


    Can some one point me how can I fix this issue?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I integrated retrofit and dagger into one of my old projects. I am getting this error when I try to run it.



      Program type already present: com.google.gson.JsonElement
      Message{kind=ERROR, text=Program type already present: com.google.gson.JsonElement, sources=[Unknown source file], tool name=Optional.of(D8)}


      This is my build gradle file



      dependencies {
      implementation fileTree(include: '*.jar', dir: 'libs')

      implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
      transitive = true
      }

      // Appflyers Lib
      api 'com.appsflyer:af-android-sdk:4.8.3'

      // Facebook SDK
      api 'com.facebook.android:facebook-android-sdk:4.36.0'

      // Support Lib
      api 'com.android.support:multidex:1.0.3'
      api 'com.android.support:appcompat-v7:27.1.1'
      api 'com.android.support:mediarouter-v7:27.1.1'
      api 'com.android.support:design:27.1.1'
      api 'com.android.support:customtabs:27.1.1'
      api 'com.android.support:support-v13:27.1.1'
      api 'com.android.support:recyclerview-v7:27.1.1'
      api 'com.android.support:cardview-v7:27.1.1'

      //Play Service Lib
      api 'com.google.android.gms:play-services-cast:16.0.2'
      api 'com.google.android.gms:play-services-plus:15.0.1'
      api 'com.google.android.gms:play-services-identity:15.0.1'
      api 'com.google.android.gms:play-services-base:15.0.1'
      api 'com.google.android.gms:play-services-gcm:15.0.1'
      api 'com.google.android.gms:play-services-auth:16.0.0'
      api 'com.google.android.gms:play-services-ads:15.0.1'
      api 'com.google.android.gms:play-services-analytics:16.0.3'

      //Firbase Service Lib
      api 'com.google.firebase:firebase-core:16.0.3'


      api 'com.github.bumptech.glide:glide:4.7.1'
      api 'com.android.volley:volley:1.1.0'
      api 'com.google.android.gms:play-services-cast-framework:16.0.2'
      api 'com.github.amlcurran.showcaseview:library:5.4.3'



      api 'com.android.support:percent:27.1.1'
      api 'com.apptentive:apptentive-android:4.1.2'
      api 'com.urbanairship.android:urbanairship-sdk:8.9.6'

      implementation project(':library')
      implementation project(':swipelistlibrary')
      implementation project(':exo_player_library')

      implementation 'com.google.dagger:dagger:2.16'
      annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
      implementation 'com.squareup.retrofit2:retrofit:2.5.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

      }


      Can some one point me how can I fix this issue?










      share|improve this question













      I integrated retrofit and dagger into one of my old projects. I am getting this error when I try to run it.



      Program type already present: com.google.gson.JsonElement
      Message{kind=ERROR, text=Program type already present: com.google.gson.JsonElement, sources=[Unknown source file], tool name=Optional.of(D8)}


      This is my build gradle file



      dependencies {
      implementation fileTree(include: '*.jar', dir: 'libs')

      implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
      transitive = true
      }

      // Appflyers Lib
      api 'com.appsflyer:af-android-sdk:4.8.3'

      // Facebook SDK
      api 'com.facebook.android:facebook-android-sdk:4.36.0'

      // Support Lib
      api 'com.android.support:multidex:1.0.3'
      api 'com.android.support:appcompat-v7:27.1.1'
      api 'com.android.support:mediarouter-v7:27.1.1'
      api 'com.android.support:design:27.1.1'
      api 'com.android.support:customtabs:27.1.1'
      api 'com.android.support:support-v13:27.1.1'
      api 'com.android.support:recyclerview-v7:27.1.1'
      api 'com.android.support:cardview-v7:27.1.1'

      //Play Service Lib
      api 'com.google.android.gms:play-services-cast:16.0.2'
      api 'com.google.android.gms:play-services-plus:15.0.1'
      api 'com.google.android.gms:play-services-identity:15.0.1'
      api 'com.google.android.gms:play-services-base:15.0.1'
      api 'com.google.android.gms:play-services-gcm:15.0.1'
      api 'com.google.android.gms:play-services-auth:16.0.0'
      api 'com.google.android.gms:play-services-ads:15.0.1'
      api 'com.google.android.gms:play-services-analytics:16.0.3'

      //Firbase Service Lib
      api 'com.google.firebase:firebase-core:16.0.3'


      api 'com.github.bumptech.glide:glide:4.7.1'
      api 'com.android.volley:volley:1.1.0'
      api 'com.google.android.gms:play-services-cast-framework:16.0.2'
      api 'com.github.amlcurran.showcaseview:library:5.4.3'



      api 'com.android.support:percent:27.1.1'
      api 'com.apptentive:apptentive-android:4.1.2'
      api 'com.urbanairship.android:urbanairship-sdk:8.9.6'

      implementation project(':library')
      implementation project(':swipelistlibrary')
      implementation project(':exo_player_library')

      implementation 'com.google.dagger:dagger:2.16'
      annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
      implementation 'com.squareup.retrofit2:retrofit:2.5.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

      }


      Can some one point me how can I fix this issue?







      android gson retrofit






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      WISHY

      3,3491454116




      3,3491454116





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373189%2fprogram-type-already-present-jsonelement-android%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373189%2fprogram-type-already-present-jsonelement-android%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          SQL update select statement

          WPF add header to Image with URL pettitions [duplicate]