Duplicate jar (ListenableFuture.class) while migrating to New Place SDK google

后端 未结 4 1704
猫巷女王i
猫巷女王i 2021-02-05 23:05

I am trying to migrate my Autocomplete widget Places SDK Google to the new one using this migration guide. But once I try to generate my release or debug apk start getting the e

相关标签:
4条回答
  • 2021-02-05 23:39

    The solution didn't work for me, but after I updated to 2.0.0 things get fixed, version 1.0.0 was giving the error, so use:

    implementation 'com.google.android.libraries.places:places:2.0.0'
    
    0 讨论(0)
  • 2021-02-05 23:44

    SOLVED: Finally found a solution. I stated earlier listenable future duplication was found while adding new dependency library for places SDK, duplicate being in the AppCompat library.

    I was using the latest AppCompat library and here was the problem. It seems as per google docs, stable version is 1.0.0. So once I revert back everything to the stable version, the problem was solved.

    implementation 'androidx.appcompat:appcompat:1.0.0'
    

    And no need of below:

    configurations {
        all*.exclude group: 'com.google.guava', module: 'listenablefuture'
    }
    
    0 讨论(0)
  • 2021-02-05 23:50

    new places SDK is working but when you migrate to android x it's not working

    so add these below lines in app/build dependencies

    dependencies {
        implementation ('com.google.android.libraries.places:places:1.0.0'){
            exclude group: 'com.google.guava', module: 'listenablefuture'
        }
    }
    
    android {
       configurations{
           all*.exclude group: 'com.google.guava', module: 'listenablefuture'
       }
    }
    
    0 讨论(0)
  • 2021-02-05 23:57

    Add this dependency to your build:

    api 'com.google.guava:guava:28.1-android'
    
    0 讨论(0)
提交回复
热议问题