Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

Fatal Exception when firing registerForPushNotifications! #49

Closed arifje closed 6 years ago

arifje commented 6 years ago

SDK: 6.2.2.GA Platform: Android SDK Tools: 26.0.1

After firing registerForPushNotifications() the app crashes. Tested in a clean/new app without any other addons.

I think the Google Play Services should be updated, possible solution.

Error details:

09-22 12:28:05.329  8529  9294 V Pushwoosh: [GCMRegistrationService] Intent action = com.pushwoosh.gcm.intent.REGISTER
09-22 12:28:05.333  8529  9294 E AndroidRuntime: FATAL EXCEPTION: IntentService[GCMRegistrationService]
09-22 12:28:05.333  8529  9294 E AndroidRuntime: Process: fail.android.app, PID: 8529
09-22 12:28:05.333  8529  9294 E AndroidRuntime: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd'$
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.google.android.gms.iid.zzd.zzeb(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.google.android.gms.iid.zzd.<init>(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.google.android.gms.iid.zzd.<init>(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.pushwoosh.GCMRegistrationService.a(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
09-22 12:28:05.333  8529  9294 E AndroidRuntime:    at android.os.HandlerThread.run(HandlerThread.java:61)

UPDATE: after updating play-services to 9.8.0 is is working again! I also had to include play-services-iid-9.8.0.jar.

wfhm commented 6 years ago

Hi,

Checking this.

mlcunha commented 6 years ago

I am having the same issue : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

How can I add/update the play-service in the project?

UPDATE: I downloaded all google-play-services lib from : https://github.com/nsiatras/Google-Play-Firebase-jars/tree/master/Version%209.8.0/google_play

It is working.

wfhm commented 6 years ago

@skoften @mlcunha Thank you for sharing the solution. The documentation will be updated shortly.