Android Question Firebasemessaging push noticafication error

Discussion in 'Android Questions' started by Liew, Apr 25, 2019.

  1. Liew

    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
     
  2. DonManfred

    DonManfred Expert Licensed User

    Add
    Code:
    #AdditionalJar: com.google.android.gms:play-services-tasks
    to your project.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Which version or B4A are you using?
     
  4. Liew

    Liew Member Licensed User

    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?
     
  5. DonManfred

    DonManfred Expert Licensed User

    no. it is part of the SDK you downloaded using the B4A SDKManager.
     
  6. Liew

    Liew Member Licensed User

    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.
     
  7. Liew

    Liew Member Licensed User

    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?
     
  8. DonManfred

    DonManfred Expert Licensed User

    Last edited: Apr 25, 2019
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice