0

I am working on a project which is using some old libraries.It is working fine except the google place auto complete as it is depricated. As I am trying to integrate new google place library implementation 'com.google.android.libraries.places:places:2.2.0' some dependency are starting to use androidx which is creating problems like aapt errors and others Below are the dependency that are coming from androidx after new place library implementation.I want to keep the old stuffs with new place auto complete api.How can I exclude them or force not to use androidx

+--- androidx.fragment:fragment:1.0.0@aar
+--- androidx.recyclerview:recyclerview:1.0.0@aar
+--- androidx.legacy:legacy-support-core-ui:1.0.0@aar
+--- androidx.legacy:legacy-support-core-utils:1.0.0@aar
+--- androidx.loader:loader:1.0.0@aar
+--- androidx.viewpager:viewpager:1.0.0@aar
+--- androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar
+--- androidx.drawerlayout:drawerlayout:1.0.0@aar
+--- androidx.slidingpanelayout:slidingpanelayout:1.0.0@aar
+--- androidx.customview:customview:1.0.0@aar
+--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar
+--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0@aar
+--- androidx.core:core:1.0.0@aar
+--- androidx.cardview:cardview:1.0.0@aar
+--- androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar
+--- androidx.versionedparcelable:versionedparcelable:1.0.0@aar
+--- androidx.collection:collection:1.0.0@jar
+--- androidx.lifecycle:lifecycle-runtime:2.0.0@aar
+--- androidx.interpolator:interpolator:1.0.0@aar
+--- androidx.cursoradapter:cursoradapter:1.0.0@aar
+--- androidx.documentfile:documentfile:1.0.0@aar
+--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0@aar
+--- androidx.print:print:1.0.0@aar
+--- androidx.lifecycle:lifecycle-livedata:2.0.0@aar
+--- androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar
+--- androidx.lifecycle:lifecycle-common:2.0.0@jar
+--- androidx.arch.core:core-runtime:2.0.0@aar
+--- androidx.arch.core:core-common:2.0.0@jar
+--- androidx.annotation:annotation:1.0.0@jar
+--- androidx.appcompat:appcompat:1.0.0@aar
+--- androidx.cardview:cardview:1.0.0@aar
+--- androidx.fragment:fragment:1.0.0@aar
+--- androidx.recyclerview:recyclerview:1.0.0@aar

I have tried below in my app.gradle

implementation ('com.google.android.libraries.places:places:2.0.0'){
    exclude group: 'androidx.core', module: 'core'
}

and this inside android option

packagingOptions {
    exclude 'META-INF/androidx.*'
    exclude 'META-INF/proguard/androidx-*'
}

Also tried to force specific version in my project level build.gradle

 configurations {

 all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-location:11.8.0'
        force 'com.google.android.gms:play-services-maps:11.8.0'
        force 'com.google.android.gms:play-services-clearcut:11.8.0'
        force 'com.google.android.gms:play-services-phenotype:11.8.0'
        force 'com.google.android.gms:play-services-base:11.8.0'
        forece 'com.google.android.gms:play-services-places-placereport:11.8.0'
        force 'com.google.android.gms:play-services-tasks:11.8.0'
        force 'com.google.android.gms:play-services-basement:11.8.0'

    }
  }
}

and below in my gradle.properties

android.useAndroidX=false
android.enableJetifier=false

But nothing working.How can I do this pls help

roy
  • 131
  • 1
  • 10

1 Answers1

0

You're probably better off enabling androidx at this point. API 29 is the minimum target SDK required on the Play Store as of date of this reply, and API 29 is the start where the android-support -> androidx cutoff started.

Jeremy Jao
  • 371
  • 3
  • 8