Forum Libraries, Components, and Plugins
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error using Google Play Services and the support library

ClockAppDevClockAppDev NLMember ✭✭

I am currently using Google Play Services and several components of the support library in my project.

The project.json file looks like this:

"dependencies": {
"Xamarin.Android.Support.Design": "",
"Xamarin.Android.Support.v7.CardView": "",
"Xamarin.Android.Support.v7.GridLayout": "",
"Xamarin.Android.Support.v7.RecyclerView": "",
"Xamarin.Android.Support.Percent": "",
"Xamarin.Android.Support.Animated.Vector.Drawable": "",
"Xamarin.Android.Support.v14.Preference": "",
"Xamarin.Android.Support.Vector.Drawable": "",
"Xamarin.GooglePlayServices.Analytics": "42.1021.1",
"Xamarin.GooglePlayServices.Location": "42.1021.1",
"Xamarin.GooglePlayServices.Maps": "42.1021.1"
"frameworks": {
"MonoAndroid,Version=7.1": {}

However, whenever I build this project I get the following error.

Error NU1607 Version conflict detected for Xamarin.Android.Support.Compat. Reference the package directly from the project to resolve this issue. MyApp.Android (>= 1.0.0) -> Xamarin.Android.Support.Vector.Drawable (>= -> Xamarin.Android.Support.Compat (>= MyApp.Android (>= 1.0.0) -> Xamarin.GooglePlayServices.Analytics (>= 42.1021.1) -> Xamarin.GooglePlayServices.Basement (>= 42.1021.1) -> Xamarin.Android.Support.v4 (>= 25.1.0) -> Xamarin.Android.Support.Compat (>= 25.1.0).

This issue doesn't occur when only the support libraries or only the google play libraries are added. It only occurs when both are added to the project.
The error seems strange as well considering the conflicting library (Xamarin.Android.Support.Compat version satisfies both the Xamarin.Android.Support.Compat (>= 25.1.0) and the Xamarin.Android.Support.Compat (>= constraint.

Best Answer


  • tuyenvtuyenv VNUniversity ✭✭✭

    Plz try to downgrade to v25.3.1.

    v25.4.0.1 isn't stable, contains a lot of bugs.


  • ThomasHagstrmThomasHagstrm SEMember ✭✭
    edited October 2017

    @tuyenv said:
    Plz try to downgrade to v25.3.1.

    v25.4.0.1 isn't stable, contains a lot of bugs.


    I'm doing exactly that - using Android.Support 25.3.1 with Xamarin.GooglePlayServices 42.1021.1.
    Even with multidex on it crashes with the following error:

    System.TypeLoadException: Could not resolve type with token 0100005a (from typeref, class/assembly Android.Gms.Gcm.Iid.InstanceID, Xamarin.GooglePlayServices.Gcm

  • ThomasHagstrmThomasHagstrm SEMember ✭✭

    @tuyenv cool, I'll check it out. only affects what SDKs are required on machine, right, not Android version on device (as that is controlled by Minimum version)?

  • tuyenvtuyenv VNUniversity ✭✭✭

    That's right! @ThomasHagstrm

Sign In or Register to comment.