0

I'm trying to convert a project to AndroidX but have encountered a strange issue with one of the play services libraries. It seems that Jetifier is replacing only the version and not the package name:

+--- com.google.android.gms:play-services-location:16.0.0
|    +--- com.google.android.gms:play-services-base:16.0.1
|    |    +--- com.google.android.gms:play-services-basement:16.0.1
|    |    |    \--- com.android.support:support-v4:26.1.0 -> 1.0.0 FAILED

It should be replacing com.android.support:support-v4 with androidx.legacy:legacy-support-v4.

Is there a workaround for when Jetifier fails to convert dependancies in this way?

Philio
  • 3,675
  • 1
  • 23
  • 33

1 Answers1

0

It turns out that simply excluding the support library does the job:

implementation ('com.google.android.gms:play-services-location:16.0.0') {
    exclude group: 'com.android.support'
}

I had tried this initially, but it was failing on another module with the same error so it looked like it wasn't working.

Philio
  • 3,675
  • 1
  • 23
  • 33