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

Exception when I use Onesignal with Xamarin.Forms.Maps #172

Closed mivewi closed 4 years ago

mivewi commented 4 years ago

Description: When I want to show google Maps I'm getting a:

Java.Lang.NoClassDefFoundError: 'Failed resolution of: Lcom/google/android/gms/dynamic/zza;'

It was working fine before I installed:

xamarin.GooglePlayServices.Base 71.1610.0 and xamarin.GooglePlayServices.Basement 71.1620.0

I need these two plugins because Com.OneSignal requires them.

When I uninstall Com.Onesignal it also doesn't work, but when I also uninstall xamarin.GooglePlayServices.Base and xamarin.GooglePlayServices.Basement again, I don't get the exception again and it shows the map. But then I can't use OneSignal.

It does sound like I it has nothing to do with OneSignal, but then again, OneSignals plugin is the only one which requires the Base and Basement plugins and I'm sure more developers wants to integrate with both maps and OneSignal, that's why I ask this here.

Environment

  1. Xamarin Forms 4.3.0.947036 (using a shell project)
  2. Xamarin.Forms.Maps 4.3.0.947036
  3. Com.OneSignal 3.5.0 All plugins is installed using nuget.

Steps to Reproduce Issue:

  1. Add Xamarin Forms 4.3.0.947036 (using a shell project)
  2. Add Xamarin.Forms.Maps 4.3.0.947036
  3. Add xamarin.GooglePlayServices.Basement (because Com.OneSignal reqiures it)
  4. Add xamarin.GooglePlayServices.Base (because xamarin.GooglePlayServices.Basement reqiures it)
  5. Add Com.OneSignal 3.5.0
  6. Show a map on a android phone using the plugin Xamarin.Forms.Maps
rgomezp commented 4 years ago

Howdy, Are you using the OneSignal Gradle Plugin?

rgomezp commented 4 years ago

Closing due to no response

yahiaalnaqeeb commented 4 years ago

@mivewi

did you solve the problem, I have the same issue that you report about it

mivewi commented 4 years ago

I got that error because another plugin - might have been Maps - which had a reference to another version of GooglePlayServices. When I aligned those versions, all worked fine.

Let me know if that helped you. If not I can try to find the specifics.