rdelrosario / xamarin-plugins

Cross platform Xamarin & Windows plugins for PCLs
MIT License
179 stars 161 forks source link

Crash On Xamarin.Android PushNotification #18

Closed oxydedefer closed 8 years ago

oxydedefer commented 8 years ago

Before thank you for your NuGet.

I have a problem when I recieve a push notification from my server . here is the stack trace : I'm on android device 5.0.2

Java.Lang.Error: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.TypeLoadException: Could not load type 'Android.OS.BaseBundle' from assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. at Android.Gms.Gcm.GcmListenerService.n_OnMessageReceived_Ljava_lang_String_Landroid_osBundle (intptr,intptr,intptr,intptr) <IL 0x0001c, 0x0013b> at (wrapper dynamic-method) object.f47bf664-6d00-4721-9ca8-6ebada36b60e (intptr,intptr,intptr,intptr) <IL 0x0001d, 0x0004b>

at --- End of managed exception stack trace --- at java.lang.Error: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.TypeLoadException: Could not load type 'Android.OS.BaseBundle' from assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. at at Android.Gms.Gcm.GcmListenerService.n_OnMessageReceived_Ljava_lang_String_Landroid_osBundle (intptr,intptr,intptr,intptr) <IL 0x0001c, 0x0013b> at at (wrapper dynamic-method) object.f47bf664-6d00-4721-9ca8-6ebada36b60e (intptr,intptr,intptr,intptr) <IL 0x0001d, 0x0004b> at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1118) at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at at java.lang.Thread.run(Thread.java:818) at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.TypeLoadException: Could not load type 'Android.OS.BaseBundle' from assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. at at Android.Gms.Gcm.GcmListenerService.n_OnMessageReceived_Ljava_lang_String_Landroid_osBundle (intptr,intptr,intptr,intptr) <IL 0x0001c, 0x0013b> at at (wrapper dynamic-method) object.f47bf664-6d00-4721-9ca8-6ebada36b60e (intptr,intptr,intptr,intptr) <IL 0x0001d, 0x0004b> at at md563bb5d7cd114ceda82ec85fb57ce3637.PushNotificationGcmListener.n_onMessageReceived(Native Method) at at md563bb5d7cd114ceda82ec85fb57ce3637.PushNotificationGcmListener.onMessageReceived(PushNotificationGcmListener.java:28) at at com.google.android.gms.gcm.GcmListenerService.zzs(Unknown Source) at at com.google.android.gms.gcm.GcmListenerService.zzk(Unknown Source) at at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source) at at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source) at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at ... 2 more

Thank you for your help

rdelrosario commented 8 years ago

Hi

Are you still having this issue?

Could you provide a sample project reproducing this?

rdelrosario commented 8 years ago

Be sure you have update your Android SDKs

oxydedefer commented 8 years ago

Finally, I find an another way for push notification, thank you for your answer

ADeCraemer commented 8 years ago

@oxydedefer What was your solution? Because i can't figure it out how to do it...

ngvtien commented 8 years ago

@oxydedefer What was your solution.

oxydedefer commented 8 years ago

I remember not very well how I found the solution. I think that I used another library but I do not know any more which exactly. Very Sorry :/

ngvtien commented 8 years ago

No worries :)

Cheers,

Tien On 09/12/2015 7:27 PM, "oxydedefer" notifications@github.com wrote:

I remember not very well how I found the solution. I think that I used another library but I do not know any more which exactly. Very Sorry :/

— Reply to this email directly or view it on GitHub https://github.com/rdelrosario/xamarin-plugins/issues/18#issuecomment-163154041 .

rdelrosario commented 8 years ago

Must compile against 21 as plugin is using API 21 specific things. Here is a great breakdown: http://redth.codes/such-android-api-levels-much-confuse-wow/

Set the target framework to API 21 on Android project