Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 18292 [details]
Sample project that demonstrate the error.
I am using both Mac and Windows, with the following info:
Xamarin Studio 6.1.1,
supports 6.0 (API level 23), 7.0 (API level 24)
SDK Tools Version: 25.2.2
SDK Platform Tools Version: 25
SDK Build Tools Version: 25
I am using Xamarin.GooglePlayServices.Gcm version 188.8.131.52 with Xamarin.Android.Support.V4 version 24.2.1. The issue that I am having is Xamarin Gcm registration service no longer registering. The following statement ends up throwing an exception
Statement: "var instanceId = InstanceID.GetInstance(Application.Context);"
Exception: "The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)"
This issue did not exist when I was using Xamarin.Android.Support.V4 version 23.2.1.
I have attached a sample project to demonstrate this issue. You may find the error in the GcmRegistrationService.cs.
Any help would be greatly appreciated.
Thank you very much!
Xamarin.Android.Support.V4 version 184.108.40.206 seems to work with Xamarin.GooglePlayServices.Gcm 220.127.116.11
The same here.
It also does not work for me with Xamarin.Android.Support.V4 version 18.104.22.168 and Xamarin.GooglePlayServices.Gcm 22.214.171.124.
The same error appears.
Any updates on that?
I'm also running into this. Is there a workaround to get push notifications working at all?
Is anybody taking a look at this issue? I'd imagine anybody that has made the mistake of updating to the latest SDKs and packages will be running into this if they use Google Play Services for push notification. This is a very serious problem for our users.
I was able to resolved this issue by updating to the latest Xamarin.GooglePlayServices.*, which is v32.961.0. If you have the previous version of Xamarin.GooglePlayService.* nuget packages installed. such as version 126.96.36.199, you would have to manually remove those packages (instead of trying to update them). Then you can install the newer version of the Xamarin.GooglePlayService.*. Hopefully after doing all that, you can resolve this issue. :) Good Luck!
thanks very much for responding.
I tried that, by deleting the packages folder in the solution's folder, and then updating the packages.config file so that the v32.961.0 nuget packages for GooglePlayServices would be installed upon re-opening the solution. This appeared to work ok, the right nuget packages were downloaded, but when I try to build the solution, it errors out with "The type or namespace 'Gcm' does not exist in the namespace 'Android.Gms'. Are you missing an assembly reference?". It doesn't seem to be able to find anything in the Android.Gms namespace.
Intellisense shows that Android.Gms.Gcm.Iid does exist. I've made sure that all the android SDKs are up to date. I'm targeting the latest installed platform (7.0) with a minimum Android version of 5.0 (API level 21) and target Android version of 6.0 (API level 23).
Right! The Android.Gms.Gcm.Iid namespace was updated to the Android.Gms.Iid. Try to replace all the "Android.Gms.Gcm.Iid" namespace(s) to "Android.Gms.Iid", hopefully this should fix the compilation error. Good luck!
Ah ok! Starting to make some progress, thanks very much!
Any idea where GcmListenerService is now located?
Great to hear! It is under namespace Android.Gms.Gcm. Good luck! :)
Hmm, I no longer have Android.Gms.Gcm as a namespace. I only have Actions, Ads, Common, Dynamic, Iid, Location and Security under Android.Gms.
Do you have Xamarin.GooglePlayServices.Gcm nuget package?
With the new v32.961.0 Xamarin.GooglePlayServices.* nuget packages, you should get:
Yes, I have those, plus Location and Maps, all version 32.961.0.
Looking at the Assembly Browser, it seems to only see Xamarin.GooglePlayServices.Basement and Xamarin.GooglePlayServices.Iid. That's probably the reason why.
Okay! Good luck! :)
Thanks very much for your help Ming. Was in the dark, now I can see the light.
Glad to hear. :)