Multiple dex files error when Migrating to the New Places SDK Client [closed]












-1















I am adopting the new update of google Places sdk in my app. I uses the version below. But I have problem with it. I don't have any clue if what is the cause of the issue. I don't know what is FinalizableReferenceQueue mentioned in the error.



dependencies {
implementation 'com.google.android.libraries.places:places:1.0.0'
}


There is no error upon building the project. The error only will show when I run the project. I'm using Android Studio.



Multiple dex files define Lcom/google/common/base/FinalizableReferenceQueue;









share|improve this question













closed as off-topic by music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S Feb 19 at 7:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Can you please post a list of the other dependencies in your gradle file?

    – amuramoto
    Jan 30 at 22:14











  • Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

    – donmj
    Jan 31 at 4:38
















-1















I am adopting the new update of google Places sdk in my app. I uses the version below. But I have problem with it. I don't have any clue if what is the cause of the issue. I don't know what is FinalizableReferenceQueue mentioned in the error.



dependencies {
implementation 'com.google.android.libraries.places:places:1.0.0'
}


There is no error upon building the project. The error only will show when I run the project. I'm using Android Studio.



Multiple dex files define Lcom/google/common/base/FinalizableReferenceQueue;









share|improve this question













closed as off-topic by music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S Feb 19 at 7:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Can you please post a list of the other dependencies in your gradle file?

    – amuramoto
    Jan 30 at 22:14











  • Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

    – donmj
    Jan 31 at 4:38














-1












-1








-1








I am adopting the new update of google Places sdk in my app. I uses the version below. But I have problem with it. I don't have any clue if what is the cause of the issue. I don't know what is FinalizableReferenceQueue mentioned in the error.



dependencies {
implementation 'com.google.android.libraries.places:places:1.0.0'
}


There is no error upon building the project. The error only will show when I run the project. I'm using Android Studio.



Multiple dex files define Lcom/google/common/base/FinalizableReferenceQueue;









share|improve this question














I am adopting the new update of google Places sdk in my app. I uses the version below. But I have problem with it. I don't have any clue if what is the cause of the issue. I don't know what is FinalizableReferenceQueue mentioned in the error.



dependencies {
implementation 'com.google.android.libraries.places:places:1.0.0'
}


There is no error upon building the project. The error only will show when I run the project. I'm using Android Studio.



Multiple dex files define Lcom/google/common/base/FinalizableReferenceQueue;






android






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 30 at 14:35









donmjdonmj

111




111




closed as off-topic by music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S Feb 19 at 7:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S Feb 19 at 7:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – music2myear, Ramhound, Mike Fitzpatrick, DrMoishe Pippik, Rajesh S

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Can you please post a list of the other dependencies in your gradle file?

    – amuramoto
    Jan 30 at 22:14











  • Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

    – donmj
    Jan 31 at 4:38



















  • Can you please post a list of the other dependencies in your gradle file?

    – amuramoto
    Jan 30 at 22:14











  • Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

    – donmj
    Jan 31 at 4:38

















Can you please post a list of the other dependencies in your gradle file?

– amuramoto
Jan 30 at 22:14





Can you please post a list of the other dependencies in your gradle file?

– amuramoto
Jan 30 at 22:14













Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

– donmj
Jan 31 at 4:38





Hi @amuramoto, I finally found the cause of the issue. Thanks. Below is my answer.

– donmj
Jan 31 at 4:38










2 Answers
2






active

oldest

votes


















1














After trial and error, commenting one dependency at a time, I finally found the issue.



apply plugin: 'com.android.application'

android {

compileSdkVersion 26
useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "xxx.com.xxx"
minSdkVersion 15
targetSdkVersion 26
versionCode 201811141
versionName "2018.11.14.1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation 'com.google.android.libraries.places:places:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.maps.android:android-maps-utils:0.4+'
implementation files('libs/acra-4.5.0.jar')
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.android.support:cardview-v7:26.+'
implementation 'com.android.support:recyclerview-v7:26.+'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
// App's dependencies, including test
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'org.apache.httpcomponents:httpcore:4.4.1'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation project(':aFileChooser')
}

//This are all the libraries that I commented to fixed the issue.
//implementation fileTree(include: ['*.jar'], dir: 'libs')//this will give mutidex error
//implementation files('libs/droid-fu-1.0-SNAPSHOT.jar')
//implementation files('libs/android-async-http-1.4.9.jar')
//compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
//implementation 'cz.msebera.android:httpclient:4.3.6' //this will give error if use





share|improve this answer































    0














    In case anyone else runs into this issue, I'll offer a little more explanation...



    The underlying cause is that the project is pre-compiling DroidFu as a JAR and including it as a dependency, which packages a few Guava classes without relabeling the package path, leading to version conflicts with Guava dependencies in the the Places SDK lib.



    Wanted to note this since it could be an issue in other projects that rely on Guava.






    share|improve this answer
































      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      After trial and error, commenting one dependency at a time, I finally found the issue.



      apply plugin: 'com.android.application'

      android {

      compileSdkVersion 26
      useLibrary 'org.apache.http.legacy'

      defaultConfig {
      applicationId "xxx.com.xxx"
      minSdkVersion 15
      targetSdkVersion 26
      versionCode 201811141
      versionName "2018.11.14.1"
      multiDexEnabled true
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
      release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      }
      }

      dependencies {
      implementation 'com.google.android.libraries.places:places:1.0.0'
      implementation 'com.android.support:multidex:1.0.3'
      implementation 'com.google.maps.android:android-maps-utils:0.4+'
      implementation files('libs/acra-4.5.0.jar')
      implementation 'com.squareup.retrofit2:retrofit:2.3.0'
      implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
      implementation 'com.squareup.okhttp3:okhttp:3.6.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
      implementation 'com.android.support:cardview-v7:26.+'
      implementation 'com.android.support:recyclerview-v7:26.+'
      implementation 'com.android.support:design:26.1.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      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'
      // App's dependencies, including test
      implementation 'com.android.support:support-annotations:27.1.1'
      implementation 'org.apache.httpcomponents:httpcore:4.4.1'
      implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
      implementation project(':aFileChooser')
      }

      //This are all the libraries that I commented to fixed the issue.
      //implementation fileTree(include: ['*.jar'], dir: 'libs')//this will give mutidex error
      //implementation files('libs/droid-fu-1.0-SNAPSHOT.jar')
      //implementation files('libs/android-async-http-1.4.9.jar')
      //compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
      //implementation 'cz.msebera.android:httpclient:4.3.6' //this will give error if use





      share|improve this answer




























        1














        After trial and error, commenting one dependency at a time, I finally found the issue.



        apply plugin: 'com.android.application'

        android {

        compileSdkVersion 26
        useLibrary 'org.apache.http.legacy'

        defaultConfig {
        applicationId "xxx.com.xxx"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 201811141
        versionName "2018.11.14.1"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
        release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        }
        }

        dependencies {
        implementation 'com.google.android.libraries.places:places:1.0.0'
        implementation 'com.android.support:multidex:1.0.3'
        implementation 'com.google.maps.android:android-maps-utils:0.4+'
        implementation files('libs/acra-4.5.0.jar')
        implementation 'com.squareup.retrofit2:retrofit:2.3.0'
        implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
        implementation 'com.squareup.okhttp3:okhttp:3.6.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
        implementation 'com.android.support:cardview-v7:26.+'
        implementation 'com.android.support:recyclerview-v7:26.+'
        implementation 'com.android.support:design:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        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'
        // App's dependencies, including test
        implementation 'com.android.support:support-annotations:27.1.1'
        implementation 'org.apache.httpcomponents:httpcore:4.4.1'
        implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
        implementation project(':aFileChooser')
        }

        //This are all the libraries that I commented to fixed the issue.
        //implementation fileTree(include: ['*.jar'], dir: 'libs')//this will give mutidex error
        //implementation files('libs/droid-fu-1.0-SNAPSHOT.jar')
        //implementation files('libs/android-async-http-1.4.9.jar')
        //compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
        //implementation 'cz.msebera.android:httpclient:4.3.6' //this will give error if use





        share|improve this answer


























          1












          1








          1







          After trial and error, commenting one dependency at a time, I finally found the issue.



          apply plugin: 'com.android.application'

          android {

          compileSdkVersion 26
          useLibrary 'org.apache.http.legacy'

          defaultConfig {
          applicationId "xxx.com.xxx"
          minSdkVersion 15
          targetSdkVersion 26
          versionCode 201811141
          versionName "2018.11.14.1"
          multiDexEnabled true
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          }

          dependencies {
          implementation 'com.google.android.libraries.places:places:1.0.0'
          implementation 'com.android.support:multidex:1.0.3'
          implementation 'com.google.maps.android:android-maps-utils:0.4+'
          implementation files('libs/acra-4.5.0.jar')
          implementation 'com.squareup.retrofit2:retrofit:2.3.0'
          implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
          implementation 'com.squareup.okhttp3:okhttp:3.6.0'
          implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
          implementation 'com.android.support:cardview-v7:26.+'
          implementation 'com.android.support:recyclerview-v7:26.+'
          implementation 'com.android.support:design:26.1.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          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'
          // App's dependencies, including test
          implementation 'com.android.support:support-annotations:27.1.1'
          implementation 'org.apache.httpcomponents:httpcore:4.4.1'
          implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
          implementation project(':aFileChooser')
          }

          //This are all the libraries that I commented to fixed the issue.
          //implementation fileTree(include: ['*.jar'], dir: 'libs')//this will give mutidex error
          //implementation files('libs/droid-fu-1.0-SNAPSHOT.jar')
          //implementation files('libs/android-async-http-1.4.9.jar')
          //compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
          //implementation 'cz.msebera.android:httpclient:4.3.6' //this will give error if use





          share|improve this answer













          After trial and error, commenting one dependency at a time, I finally found the issue.



          apply plugin: 'com.android.application'

          android {

          compileSdkVersion 26
          useLibrary 'org.apache.http.legacy'

          defaultConfig {
          applicationId "xxx.com.xxx"
          minSdkVersion 15
          targetSdkVersion 26
          versionCode 201811141
          versionName "2018.11.14.1"
          multiDexEnabled true
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
          release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          }
          }

          dependencies {
          implementation 'com.google.android.libraries.places:places:1.0.0'
          implementation 'com.android.support:multidex:1.0.3'
          implementation 'com.google.maps.android:android-maps-utils:0.4+'
          implementation files('libs/acra-4.5.0.jar')
          implementation 'com.squareup.retrofit2:retrofit:2.3.0'
          implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
          implementation 'com.squareup.okhttp3:okhttp:3.6.0'
          implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
          implementation 'com.android.support:cardview-v7:26.+'
          implementation 'com.android.support:recyclerview-v7:26.+'
          implementation 'com.android.support:design:26.1.0'
          implementation 'com.android.support.constraint:constraint-layout:1.1.3'
          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'
          // App's dependencies, including test
          implementation 'com.android.support:support-annotations:27.1.1'
          implementation 'org.apache.httpcomponents:httpcore:4.4.1'
          implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
          implementation project(':aFileChooser')
          }

          //This are all the libraries that I commented to fixed the issue.
          //implementation fileTree(include: ['*.jar'], dir: 'libs')//this will give mutidex error
          //implementation files('libs/droid-fu-1.0-SNAPSHOT.jar')
          //implementation files('libs/android-async-http-1.4.9.jar')
          //compile 'com.squareup.retrofit2:converter-scalars:2.0.0'
          //implementation 'cz.msebera.android:httpclient:4.3.6' //this will give error if use






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 31 at 4:36









          donmjdonmj

          111




          111

























              0














              In case anyone else runs into this issue, I'll offer a little more explanation...



              The underlying cause is that the project is pre-compiling DroidFu as a JAR and including it as a dependency, which packages a few Guava classes without relabeling the package path, leading to version conflicts with Guava dependencies in the the Places SDK lib.



              Wanted to note this since it could be an issue in other projects that rely on Guava.






              share|improve this answer






























                0














                In case anyone else runs into this issue, I'll offer a little more explanation...



                The underlying cause is that the project is pre-compiling DroidFu as a JAR and including it as a dependency, which packages a few Guava classes without relabeling the package path, leading to version conflicts with Guava dependencies in the the Places SDK lib.



                Wanted to note this since it could be an issue in other projects that rely on Guava.






                share|improve this answer




























                  0












                  0








                  0







                  In case anyone else runs into this issue, I'll offer a little more explanation...



                  The underlying cause is that the project is pre-compiling DroidFu as a JAR and including it as a dependency, which packages a few Guava classes without relabeling the package path, leading to version conflicts with Guava dependencies in the the Places SDK lib.



                  Wanted to note this since it could be an issue in other projects that rely on Guava.






                  share|improve this answer















                  In case anyone else runs into this issue, I'll offer a little more explanation...



                  The underlying cause is that the project is pre-compiling DroidFu as a JAR and including it as a dependency, which packages a few Guava classes without relabeling the package path, leading to version conflicts with Guava dependencies in the the Places SDK lib.



                  Wanted to note this since it could be an issue in other projects that rely on Guava.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 1 at 16:58

























                  answered Jan 30 at 22:02









                  amuramotoamuramoto

                  1013




                  1013















                      Popular posts from this blog

                      Plaza Victoria

                      Puebla de Zaragoza

                      Musa