OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
105 stars 50 forks source link

Version conflict detected for Xamarin.Android.Support.Compat #148

Closed omrishsu closed 5 years ago

omrishsu commented 5 years ago

Error: NU1107 Version conflict detected for Xamarin.Android.Support.Compat. Install/reference Xamarin.Android.Support.Compat 27.0.2.1 directly to project XXX to resolve this issue. XXX -> Xamarin.Android.Support.v7.MediaRouter 27.0.2.1 -> Xamarin.Android.Support.v7.Palette 27.0.2.1 -> Xamarin.Android.Support.Compat (= 27.0.2.1) XXX -> XXX -> Com.OneSignal 3.3.0 -> Xamarin.Android.Support.CustomTabs 26.0.2 -> Xamarin.Android.Support.Compat (= 26.0.2). XXX

I've followed other issues suggestions like using onesignal 3.3.0 version, targeting android 9.0, etc and I still get this error.

<PackageReference Include="Com.OneSignal" Version="3.3.0" />
<PackageReference Include="Xamarin.Forms" Version="3.4.0.1008975" />
JoseluDAM2000 commented 5 years ago

Hi @omrivm to fix that you can install manually "Xamarin.Android.Support.Compat" Version 27.0.2 And "Xamarin.Android.Support.Core.Utils" Version 27.0.2 into your android project.

omrishsu commented 5 years ago

@JoseluDAM2000 Thank you, however updating only part of Xamarin leads to more compatibility issues. Here is a simple (empty) project that demonstrates the problem. I could not make it work... App2.zip The one signal logic should be on the App2 project (common for both android and ios)

rgomezp commented 5 years ago

Howdy, Thanks for your patience while we reproduce/investigate

omrishsu commented 5 years ago

@rgomezp thank you. We have some internal urgency to select a solution, and yours seems simple to integrate, so if you can prioritize this problem it would be great.

rgomezp commented 5 years ago

If you are a paying OneSignal customer, please contact us through our official support channel at OneSignal.com in order to prioritize your request accordingly. Thank you

omrishsu commented 5 years ago

@rgomezp as soon as I'll get this POC up and running I'm sure we will be a paying customer (since, as I wrote, we have some internal urgency to integrate a push notification solution in our product). right now, I can't even build an empty app with your solution...

omrishsu commented 5 years ago

Any news regarding this issue?

JoseluDAM2000 commented 5 years ago

@omrivm In previous versions I managed to overcome it by doing this:

Hi @omrivm to fix that you can install manually "Xamarin.Android.Support.Compat" Version 27.0.2 And "Xamarin.Android.Support.Core.Utils" Version 27.0.2 into your android project.

If your case is so urgent you must do that. Any conflicts like that must be solved in the same way. Is not that hard.

Also you can update Xamarin.Forms to the Version 4.1.0.581479 and you didnt going to have that problem.

omrishsu commented 5 years ago

@JoseluDAM2000 thank you, however, as I wrote it does not solve the problem. Here is a simple app with Xamarin.Forms 4.1.0.581479 with the same problem... App3.zip

JoseluDAM2000 commented 5 years ago

@omrivm @rgomezp Just by install the nuget Xamarin.Android.Support.Compat 27.0.2.1 everything was solved from the compatibilities, the rest of the errors comes from the .java code.

omrishsu commented 5 years ago

@JoseluDAM2000 did you use the example project I've posted? because I could not solve it as you suggested. if so, can you please post it back "fixed"?

JoseluDAM2000 commented 5 years ago

Its only one line... Add the PackageReference to the compact library on the Android.csproj.

<ItemGroup>
    <PackageReference Include="Xamarin.Android.Support.Compat">
      <Version>27.0.2.1</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms" Version="3.4.0.1008975" />
    <PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2.1" />
  </ItemGroup>
omrishsu commented 5 years ago

@JoseluDAM2000 thank you. Maybe i was not clear in my post. I know how to do it. it just does not solve the problem.

omrishsu commented 5 years ago

I was finally able to overcome this problem by all the following: 1 - update to xamarian 4.1.0.581479 2 - update all Xamarin.Android.Support to 28.0.0.1 3 - install Install-Package Xamarin.GooglePlayServices.Base -Version 42.1021.1 4 - install Install-Package Xamarin.GooglePlayServices.Maps -Version 42.1021.1 5 - enabling Multi-dex 6 - targeting android 9.0

I suggest you add it to the documentation...

rgomezp commented 5 years ago

Thanks @omrivm , I will add this to our error logging spreadsheet

MarcoSal commented 3 years ago

i have similari issue with Xamarin.Android.Support to 28.0.0.3 https://github.com/OneSignal/OneSignal-Xamarin-SDK/issues/239

I couldn't find a solution ...