Can I use support-v4 of a higher version for google play-services-basement-11.6.2?

568 Views Asked by At

Hey guys I am trying to manually upgrade the Google Play Services to the latest version 11.6.2 in my Unity project so I have to download the individual .aar files from google's latest Maven Repository.

Looking at the .pom for play-services-basement, https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/11.6.2/play-services-basement-11.6.2.pom

I found out it requires dependency support-v4-25.2.0, however, the latest support-v4 in the maven repository is already at 27.0.2 at this time of writing.

I briefly read that maven uses soft version number over here: https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification, but I can't be too sure if there will be any conflicts resulting in runtime errors so I needed some confirmations.

Will there be any issue if I use the latest support-v4-27.0.2 instead of support-v4-25.2.0?

1

There are 1 best solutions below

0
Coder On

In the end I downloaded and use the latest Unity Jar Resolver https://github.com/googlesamples/unity-jar-resolver

Using the following .xml -> Assets/Editor/PlayServicesDependencies.xml,

<dependencies>
    <androidPackages>
        <androidPackage spec="com.google.android.gms:play-services-ads:11.6.2" />
        <androidPackage spec="com.google.android.gms:play-services-gcm:11.6.2" />
        <androidPackage spec="com.google.android.gms:play-services-location:11.6.2" />
        <androidPackage spec="com.google.android.gms:play-services-safetynet:11.6.2" />
        <androidPackage spec="com.android.support:support-v4:27.0.2" />
    </androidPackages>
</dependencies>

It is able to download the latest google-play-services 11.6.2 components that I need and support-v4 27.0.2 from the maven repository and then resolve any conflict between them.