Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
555 stars 184 forks source link

Usage with FacebookSDK causes error #87

Closed vratislavino closed 6 years ago

vratislavino commented 6 years ago

Hello it could be some basic mistake, but Im freaking out. I need to use Facebook in my game, that uses libraries like support-compat, support-core-ui etc, same as this notification plugin, but in different versions. So Facebook uses version 25.3.1, notifications 26.1.0. Ofc I can't have there the same libs in two versions, but if i try to use newer ones (yours: 26.1.0), Facebook won't run. If I use any libs (any versions), it causes error, when i try to use this notification plugin.

AndroidJavaException: java.lan.g.NoSuchMethodError: no static method with name='SetNotification' signature='(IJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;IILjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/Object;' in class Ljava.lang.Object;
com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source)
....

Don't you know what to do with that error? Basically summary is this: I need to use older libraries to fire notifications and I get the error above when I try to call any of methods (I use code from the example).

I copied all files (even notification.jar) from example project.

Edit: I tried even recompile plugin as aar in Android Studio (even with lower targetSdk and version 25.3.1. Am I missing something here? Still getting "no such method". Btw I do some OOP programming and I have to say its wierd it tries to look for the custom static method in class Ljava.lang.Object intead of NotificationManager class. Or is it normal?

Thank, guys.

trdinich commented 6 years ago

I came here to describe an identical issue. I actually can't find any way to support notifications on Android Oreo while keeping the Facebook plugin installed b/c of the issue you're describing. In the absence of Facebook allowing v26 of those libraries, I am confused how we're supposed to get notifications working on devices with API-26.

Agasper commented 6 years ago

Just update all the plugins