Error Program type already present: com.google.common.util.concurrent.ListenableFuture











up vote
0
down vote

favorite












I'm need to use two guava classes:



import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;


But i'm getting this, when buildrebuild project:



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


This is my build.gradle file:



also i'm tried to write exclude, but maybe i'm doing this wrong?



And i'm tried to delete crashlytics logs, tried to delete gms-services, but nothing helps



apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://jitpack.io' }
mavenCentral()
jcenter()
}
android {
useLibrary 'org.apache.http.legacy'
lintOptions {

checkReleaseBuilds false

}
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
compileSdkVersion 27
defaultConfig {
applicationId "com.jinga.updater"
minSdkVersion 26
targetSdkVersion 27
versionCode 16
versionName "2.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
def archLifecycleVersion = '1.1.1'
def room_version = "1.1.1"
def versions_work = "1.0.0-alpha09"


implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.novoda:merlin:1.1.7'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'

implementation 'com.android.support:design:27.1.1'
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 'io.reactivex.rxjava2:rxandroid:2.0.2'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation group: 'com.google.guava', name: 'guava', version: '23.5-android'

implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"

// Room components
androidTestImplementation "android.arch.persistence.room:testing:$room_version"

// Lifecycle components
implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"



implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-messaging:17.3.1'

implementation group: 'commons-io', name: 'commons-io', version: '2.5'

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
implementation 'com.android.support:recyclerview-v7:27.1.1'

implementation 'com.yandex.android:mobmetricalib:3.2.2'

implementation 'com.github.nkzawa:socket.io-client:0.3.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:cardview-v7:27.1.1'
//circleImage
implementation 'com.orhanobut:dialogplus:1.11@aar'

implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
implementation "android.arch.work:work-runtime:$versions_work"

}

apply plugin: 'com.google.gms.google-services'


What i should to do to solve this issue, i see some examples on stack with work-manager, but they dont help me










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm need to use two guava classes:



    import com.google.common.collect.ImmutableMap;
    import com.google.common.collect.ImmutableSet;


    But i'm getting this, when buildrebuild project:



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


    This is my build.gradle file:



    also i'm tried to write exclude, but maybe i'm doing this wrong?



    And i'm tried to delete crashlytics logs, tried to delete gms-services, but nothing helps



    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'


    repositories {
    maven { url 'https://maven.google.com' }
    maven { url 'https://jitpack.io' }
    mavenCentral()
    jcenter()
    }
    android {
    useLibrary 'org.apache.http.legacy'
    lintOptions {

    checkReleaseBuilds false

    }
    packagingOptions {
    exclude 'META-INF/proguard/androidx-annotations.pro'
    }
    compileSdkVersion 27
    defaultConfig {
    applicationId "com.jinga.updater"
    minSdkVersion 26
    targetSdkVersion 27
    versionCode 16
    versionName "2.1"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    }

    }

    dependencies {
    def archLifecycleVersion = '1.1.1'
    def room_version = "1.1.1"
    def versions_work = "1.0.0-alpha09"


    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.novoda:merlin:1.1.7'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:support-v4:27.1.1'

    implementation 'com.android.support:design:27.1.1'
    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 'io.reactivex.rxjava2:rxandroid:2.0.2'

    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation group: 'com.google.guava', name: 'guava', version: '23.5-android'

    implementation "android.arch.persistence.room:runtime:$room_version"
    annotationProcessor "android.arch.persistence.room:compiler:$room_version"

    // Room components
    androidTestImplementation "android.arch.persistence.room:testing:$room_version"

    // Lifecycle components
    implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
    annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"



    implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation 'com.google.firebase:firebase-messaging:17.3.1'

    implementation group: 'commons-io', name: 'commons-io', version: '2.5'

    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
    implementation 'com.android.support:recyclerview-v7:27.1.1'

    implementation 'com.yandex.android:mobmetricalib:3.2.2'

    implementation 'com.github.nkzawa:socket.io-client:0.3.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.android.support:cardview-v7:27.1.1'
    //circleImage
    implementation 'com.orhanobut:dialogplus:1.11@aar'

    implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

    implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
    implementation "android.arch.work:work-runtime:$versions_work"

    }

    apply plugin: 'com.google.gms.google-services'


    What i should to do to solve this issue, i see some examples on stack with work-manager, but they dont help me










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm need to use two guava classes:



      import com.google.common.collect.ImmutableMap;
      import com.google.common.collect.ImmutableSet;


      But i'm getting this, when buildrebuild project:



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


      This is my build.gradle file:



      also i'm tried to write exclude, but maybe i'm doing this wrong?



      And i'm tried to delete crashlytics logs, tried to delete gms-services, but nothing helps



      apply plugin: 'com.android.application'
      apply plugin: 'io.fabric'


      repositories {
      maven { url 'https://maven.google.com' }
      maven { url 'https://jitpack.io' }
      mavenCentral()
      jcenter()
      }
      android {
      useLibrary 'org.apache.http.legacy'
      lintOptions {

      checkReleaseBuilds false

      }
      packagingOptions {
      exclude 'META-INF/proguard/androidx-annotations.pro'
      }
      compileSdkVersion 27
      defaultConfig {
      applicationId "com.jinga.updater"
      minSdkVersion 26
      targetSdkVersion 27
      versionCode 16
      versionName "2.1"

      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
      release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      }
      compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
      }

      }

      dependencies {
      def archLifecycleVersion = '1.1.1'
      def room_version = "1.1.1"
      def versions_work = "1.0.0-alpha09"


      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.novoda:merlin:1.1.7'
      implementation 'com.android.support.constraint:constraint-layout:1.1.2'
      implementation 'com.android.support:support-v4:27.1.1'

      implementation 'com.android.support:design:27.1.1'
      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 'io.reactivex.rxjava2:rxandroid:2.0.2'

      implementation 'com.squareup.retrofit2:retrofit:2.4.0'
      implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
      implementation group: 'com.google.guava', name: 'guava', version: '23.5-android'

      implementation "android.arch.persistence.room:runtime:$room_version"
      annotationProcessor "android.arch.persistence.room:compiler:$room_version"

      // Room components
      androidTestImplementation "android.arch.persistence.room:testing:$room_version"

      // Lifecycle components
      implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
      annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"



      implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
      implementation 'com.google.firebase:firebase-core:16.0.3'
      implementation 'com.google.firebase:firebase-messaging:17.3.1'

      implementation group: 'commons-io', name: 'commons-io', version: '2.5'

      implementation 'com.jakewharton:butterknife:8.8.1'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
      implementation 'com.google.code.gson:gson:2.8.5'
      implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
      implementation 'com.android.support:recyclerview-v7:27.1.1'

      implementation 'com.yandex.android:mobmetricalib:3.2.2'

      implementation 'com.github.nkzawa:socket.io-client:0.3.0'
      implementation 'com.squareup.picasso:picasso:2.71828'
      implementation 'com.android.support:cardview-v7:27.1.1'
      //circleImage
      implementation 'com.orhanobut:dialogplus:1.11@aar'

      implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

      implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
      implementation "android.arch.work:work-runtime:$versions_work"

      }

      apply plugin: 'com.google.gms.google-services'


      What i should to do to solve this issue, i see some examples on stack with work-manager, but they dont help me










      share|improve this question













      I'm need to use two guava classes:



      import com.google.common.collect.ImmutableMap;
      import com.google.common.collect.ImmutableSet;


      But i'm getting this, when buildrebuild project:



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


      This is my build.gradle file:



      also i'm tried to write exclude, but maybe i'm doing this wrong?



      And i'm tried to delete crashlytics logs, tried to delete gms-services, but nothing helps



      apply plugin: 'com.android.application'
      apply plugin: 'io.fabric'


      repositories {
      maven { url 'https://maven.google.com' }
      maven { url 'https://jitpack.io' }
      mavenCentral()
      jcenter()
      }
      android {
      useLibrary 'org.apache.http.legacy'
      lintOptions {

      checkReleaseBuilds false

      }
      packagingOptions {
      exclude 'META-INF/proguard/androidx-annotations.pro'
      }
      compileSdkVersion 27
      defaultConfig {
      applicationId "com.jinga.updater"
      minSdkVersion 26
      targetSdkVersion 27
      versionCode 16
      versionName "2.1"

      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
      release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      }
      compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
      }

      }

      dependencies {
      def archLifecycleVersion = '1.1.1'
      def room_version = "1.1.1"
      def versions_work = "1.0.0-alpha09"


      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.novoda:merlin:1.1.7'
      implementation 'com.android.support.constraint:constraint-layout:1.1.2'
      implementation 'com.android.support:support-v4:27.1.1'

      implementation 'com.android.support:design:27.1.1'
      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 'io.reactivex.rxjava2:rxandroid:2.0.2'

      implementation 'com.squareup.retrofit2:retrofit:2.4.0'
      implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
      implementation group: 'com.google.guava', name: 'guava', version: '23.5-android'

      implementation "android.arch.persistence.room:runtime:$room_version"
      annotationProcessor "android.arch.persistence.room:compiler:$room_version"

      // Room components
      androidTestImplementation "android.arch.persistence.room:testing:$room_version"

      // Lifecycle components
      implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
      annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"



      implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
      implementation 'com.google.firebase:firebase-core:16.0.3'
      implementation 'com.google.firebase:firebase-messaging:17.3.1'

      implementation group: 'commons-io', name: 'commons-io', version: '2.5'

      implementation 'com.jakewharton:butterknife:8.8.1'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
      implementation 'com.google.code.gson:gson:2.8.5'
      implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
      implementation 'com.android.support:recyclerview-v7:27.1.1'

      implementation 'com.yandex.android:mobmetricalib:3.2.2'

      implementation 'com.github.nkzawa:socket.io-client:0.3.0'
      implementation 'com.squareup.picasso:picasso:2.71828'
      implementation 'com.android.support:cardview-v7:27.1.1'
      //circleImage
      implementation 'com.orhanobut:dialogplus:1.11@aar'

      implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

      implementation 'com.liulishuo.okdownload:okdownload:1.0.4'
      implementation "android.arch.work:work-runtime:$versions_work"

      }

      apply plugin: 'com.google.gms.google-services'


      What i should to do to solve this issue, i see some examples on stack with work-manager, but they dont help me







      android gradle






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 8 at 23:49









      Eugene Korotkov

      486




      486





























          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%2f53217854%2ferror-program-type-already-present-com-google-common-util-concurrent-listenable%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%2f53217854%2ferror-program-type-already-present-com-google-common-util-concurrent-listenable%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

          Schultheiß

          Verwaltungsgliederung Dänemarks

          Liste der Kulturdenkmale in Wilsdruff