Android Question Firebasemessaging push noticafication error

Liew

Member
Licensed User
Dear All,

I had been checking all the previous forum thread on this issue :

The error code is :
Running main
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
java.lang.NoSuchMethodError: No virtual method subscribeToTopic(Ljava/lang/String;)Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging' appears in /data/app/etp.pushexample-Oh2-nOhEYhTMaMxKZYg2NQ==/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at etp.pushexample.firebasemessaging._subscribetotopics(firebasemessaging.java:263)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)

The issue about no such method as according to some thread is due to build & run time library(class) is different. But how I update B4 internal library folder, java version whatsoever, it is still the same.

Kindly help me on the issue above.

Thanks.
Regards,
Liew
 

Liew

Member
Licensed User
Add
B4X:
#AdditionalJar: com.google.android.gms:play-services-tasks
to your project.
Dear DonManfred,

First of all, thanks for your reply. I will definitely try it out and let you know.
By the way do I need to download this jar file and put it to some additional library folder?
 

Liew

Member
Licensed User
Which version or B4A are you using?
Hi Erel,

I am using version 8.3 with no success, than I tried your new version 9.0.
Both does not work and the more I do update I am facing for library issue like Maven not found error.
Thanks.
 

Liew

Member
Licensed User
no. it is part of the SDK you downloaded using the B4A SDKManager.
Hi DonManfred,

I hope you don't mind me ask a simple question. Each time I update B4 it only gave a B4.EXE file. Will do configure and update with the file that you mentioned?
 

DonManfred

Expert
Licensed User
Last edited:
Top