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
104 stars 50 forks source link

Cannot build the Solution on VISUAL STUDIO when installing ONESIGNAL 3.10.4 NUGET PACKAGE #230

Closed tagathangelou closed 3 years ago

tagathangelou commented 3 years ago

Description:

My VS is fully updated, all nuget packages are fully updated to the most stable version and once i install the ONESIGNAL nuget package i get the following error when i try to build my solution:

Can not resolve reference: Xamarin.Android.Support.Collections, referenced by Xamarin.GooglePlayServices.Base. Please add a NuGet package or assembly reference for Xamarin.Android.Support.Collections, or remove the reference to Xamarin.GooglePlayServices.Base. Environment 1.My Android version Target framework is 10.0

  1. Visual studio 2019 fully updated
  2. NET STANDARD LIBRARY - latest stable version - basically all nuget packages are fully updated
  3. installed onesignal latest stable version 3.10.4 via nuget package target framework android

Steps to Reproduce Issue:

  1. Add onesignal nuget package 3.10.4
  2. Try to build the app and receive the error:

error build app after installing onesignal

My INSTALLED PACKAGES ARE: installed nugetpackages

installed nugetpackages 2

My Visual Studio version:

vs2019

tagathangelou commented 3 years ago

Anybody with a solution to this?

Onesignal contacted me and told me to install Xamarin.AndroidX.Migration to my project should solve this issue in the short term while will work on a solution.

That solution does not work for me and the problem remains exactly the same.

JigarM commented 3 years ago

@tagathangelou Facing the same issue. Even I tried the solution which you have mentioned but still facing the same issue.

tmijieux commented 3 years ago

apart from onesignal, I am not using firebase, but i have no problems using onesignal at the moment (even alongside androidx) with the following dependencies: (but maybe keeping your firebase packages as they are may will conflicts with some of these packages ?)

    <PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
    <PackageReference Include="Xamarin.GooglePlayServices.Base" Version="71.1610.1" />
    <PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="71.1601.1" />
    <PackageReference Include="Xamarin.Google.Android.Material" Version="1.3.0.1" />
    <PackageReference Include="Xamarin.AndroidX.AppCompat.Resources" Version="1.1.0.1" />
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.0.1" />
    <PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.5" />
    <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.7" />
    <PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.3" />
    <PackageReference Include="Xamarin.Android.Support.Annotations" Version="28.0.0.3" />
    <PackageReference Include="Xamarin.Android.Support.Compat" Version="28.0.0.3" />
JigarM commented 3 years ago

@jkasten2 I have applied the solution mentioned in below URL and it works fine now. https://github.com/OneSignal/OneSignal-Xamarin-SDK/issues/228#issuecomment-813979825

Thanks

jkasten2 commented 3 years ago

We just released Com.OneSignal 3.10.5 with dependency changes to resolve the AndroidX compatibility. Simply upgrade to this version and rebuild your project.

tagathangelou commented 3 years ago

Thanks for releasing the solution with the new version 3.10.5 - i already rebuild and it connects smoothly retrieving the device player ID