0
votes

I've to migrate my old project to AndroidX and updating all dependencies to the newest version but the only one got an error in manifest merging.

only this dependency got Error ERROR: Manifest merger failed with multiple errors, see logs:

implementation 'com.google.android.libraries.places:places-compat:2.1.0'

I mean, when I remove it the error gone away.

this is my app.build


    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 28
        buildToolsVersion '28.0.3'
        defaultConfig {
            applicationId "com.pertamina.tbbm.rewulu.ecodriving.mobil"
            minSdkVersion 16
            targetSdkVersion 28
            versionCode 12
            versionName "5.5.1"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.release
            }
        }
        dexOptions {
            javaMaxHeapSize "8g"
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.recyclerview:recyclerview:1.0.0'
        implementation 'androidx.cardview:cardview:1.0.0'
        implementation 'androidx.multidex:multidex:2.0.1'
        implementation 'com.google.code.gson:gson:2.8.5'
        implementation 'com.squareup.retrofit2:retrofit:2.3.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
        implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
        implementation 'com.google.android.material:material:1.0.0'
        implementation 'com.sothree.slidinguppanel:library:3.4.0'
        implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
        implementation 'com.google.android.gms:play-services-auth:17.0.0'
        implementation 'com.google.android.gms:play-services-maps:17.0.0'
        implementation 'com.google.android.libraries.places:places:2.1.0'
        implementation 'com.google.android.libraries.places:places-compat:2.1.0'
        implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
        implementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test:runner:1.2.0'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    }
    apply plugin: 'com.google.gms.google-services'


And here Manifest.xml

enter image description here

I really don't know whats any wrong with my configurations..looking online for a whole day but got nothing...

NB: When I migrate to AndroidX, pressing Refractor > Migrate to AndroidX there's is warning pop says No Usages Found in the Project.

Thanks

2
try, this my solutionR.Desai

2 Answers

1
votes

Try to remove implementation 'com.google.android.libraries.places:places:2.1.0' from your applications build.gradle file it should work fine

0
votes

Have you tried replacing the dependency as below?

    implementation "com.google.android.libraries.places:places:1.1.0"