Android Question [solved] Error with SubscribeToTopics

bgsoft

Well-Known Member
Licensed User
Hi:
I have a perfectly working app from a few years ago with FireBase notification.
Now I have compiled without modifying the program, and it gives me this error when calling SubscribeToTopics:

firebasemessaging_subscribetotopics (java line: 882)
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/bgs.deixalleria-2/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:147)
at bgs.deixalleria.firebasemessaging._subscribetotopics(firebasemessaging.java:882)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1082)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1029)
at bgs.deixalleria.starter$ResumableSub_HacerRegistroPushInicial.resume(starter.java:239)
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1704)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

The version of B4A is 10.2
In the manifest: minSdkVersion = "14" targetSdkVersion = "19"
The java: jdk1.8.0_281 \ bin \ javac.exe
The android.jar: android-30 \ android.jar

Any ideas?

Health

Jesús
 

bgsoft

Well-Known Member
Licensed User
Thanks, it was one of the first things I did, and it gave me the same error, and I reinstalled version 10.2 because I had problems displaying the Logs, and my concern is to solve that problem and not have more with a new version.

regards
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Thanks, it was one of the first things I did, and it gave me the same error, and I reinstalled version 10.2 because I had problems displaying the Logs, and my concern is to solve that problem and not have more with a new version.

regards
Try to reinstall b4a, i know, it should just work with a simple update, but from 9.8 to 10+ looks like is not simple.. (if i understand correct it is about the sdk)

Anyway, reinstall b4a in a new/clean folder, follow the steps and don't run sdk manager..
 
Upvote 0

bgsoft

Well-Known Member
Licensed User
Hi

I found the problem. When updating the java it was not in the correct folder for some reason, I have deleted the java and the sdk. I have installed it again and it already works, and the Logs as well.
Thanks

Health
 
Upvote 0
Top