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

Incompatibility - Xamarin.Android.Support.v4 - Revision 27.2.0 #91

Closed taublast closed 6 years ago

taublast commented 6 years ago

Hi, using your nuget in my xamarin.forms project, using version 3.0.1 and cannot upgrade to 3.1.1 because Xamarin Android bindings for your latest version have following dependencies:

Xamarin.Android.Support.CustomTabs (>= 26.0.0 && < 27.2.0) Xamarin.Android.Support.v4 (>= 26.0.0 && < 27.2.0)

Whats wrong with 27.2.0, its the latest xamarin..

tidusjar commented 6 years ago

I have this issue too.

Version conflict detected for Xamarin.Android.Support.Compat. Reference the package directly from the project to resolve this issue. 
 OmbiMobile.Android -> OmbiMobile -> Com.OneSignal 3.1.1 -> Xamarin.Android.Support.CustomTabs 26.0.2 -> Xamarin.Android.Support.Compat (= 26.0.2) 
 OmbiMobile.Android -> Xamarin.Android.Support.Design 25.4.0.2 -> Xamarin.Android.Support.Compat (= 25.4.0.2).  
jkasten2 commented 6 years ago

@taublast 27.2.0 wasn't released at the time 3.1.1 was released. We added an upper bound restriction to prevent upgrading to untested versions.

You will need to add Xamarin.Android.Support.CustomTabs and Xamarin.Android.Support.v4 from nuget before adding OneSignal to fix the issue.

We will be updating to < 27.3.0 in the next release as have already confirmed 27.2.0 is fine.

@taublast I believe this will fix your issue as well. You might need to also add Xamarin.Android.Support.Compat in your case however.

Update: Version 27.0.2 and 27.1.1 have been tested with the latest native OneSignal Android SDK used by this Xamarin SDK.

jkasten2 commented 6 years ago

@taublast Actually Xamarin does not have a 27.2.0 version, their latest is 27.0.2. https://www.nuget.org/packages/Xamarin.Android.Support.v4/

What specific error are you seeing?

taublast commented 6 years ago

Just installed without errors.. Xamarin.Android.Support.CustomTabs is at 27.0.2, your latest package reqs at < 27.2.0

ali-h2010 commented 6 years ago

i am getting the following error when i try to add OneSignal Nuget to the Android Project:

Com.OneSignal 3.2.0 depends on Xamarin.Android.Support.CustomTabs (>= 26.0.0 && < 27.2.0) but Xamarin.Android.Support.CustomTabs 26.0.0 was not found. An approximate best match of Xamarin.Android.Support.CustomTabs 26.0.2 was resolved.
Version conflict detected for Xamarin.Android.Support.Compat. Reference the package directly from the project to resolve this issue. 
 Radam2020.Android (>= 1.0.0) -> Com.OneSignal (>= 3.2.0) -> Xamarin.Android.Support.CustomTabs (>= 26.0.2) -> Xamarin.Android.Support.Compat (>= 26.0.2) 
 Radam2020.Android (>= 1.0.0) -> Xamarin.Android.Support.Design (>= 25.4.0.2) -> Xamarin.Android.Support.Compat (>= 25.4.0.2).
taublast commented 6 years ago

Why don't you update your xamarin, im at 27.0.2.1 Xamarin.Android.Support.CustomTabs

ali-h2010 commented 6 years ago

I updated Xamarin forms to the latest version but Android.Support is not being updated. I am using Prism library. does that have anything to do with it? Thanks for the quick response

ali-h2010 commented 6 years ago

for anyone having same issue. You should know that updating the Android.Support packages is not straight forward process and require installing dependencies in a specific order. This awesome video by Redth helped https://redth.codes/how-to-fix-the-dreaded-version-conflict-nuget-error-in-your-xamarin-android-projects/

note that you need to read the error messages and may need to install extra dependencies depending on the Nuget that you want to install.

taublast commented 6 years ago

Convert your xamarin.forms project to latest Net Standart 2.0 it would be much easier updating nugets after that. https://blog.xamarin.com/building-xamarin-forms-apps-net-standard/

taublast commented 6 years ago

Consider closing issue too =)

ali-h2010 commented 6 years ago

@taublast , i am already using the latest Net Standard 2.0.3 with prism. And i believe the issue is already closed. Thanks for the support.