bgsoft Well-Known Member Licensed User Longtime User Apr 28, 2021 #1 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/StringLcom/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
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/StringLcom/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
M MikeSW17 Active Member Licensed User Longtime User Apr 28, 2021 #2 First update to B4A 10.7, you are way out of date. Follow ALL the steps Exactly here: https://www.b4x.com/b4a.html Upvote 0
First update to B4A 10.7, you are way out of date. Follow ALL the steps Exactly here: https://www.b4x.com/b4a.html
bgsoft Well-Known Member Licensed User Longtime User Apr 29, 2021 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Apr 29, 2021 #4 No reason to use an old version. Use B4A 10.7. Delete your current Android SDK and download a new one: https://www.b4x.com/b4a.html If you still get this error then you haven't followed the instructions correctly. Upvote 0
No reason to use an old version. Use B4A 10.7. Delete your current Android SDK and download a new one: https://www.b4x.com/b4a.html If you still get this error then you haven't followed the instructions correctly.
f0raster0 Well-Known Member Licensed User Longtime User Apr 29, 2021 #5 bgsoft said: 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 Click to expand... 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 said: 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 Click to expand... 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..
bgsoft Well-Known Member Licensed User Longtime User Apr 29, 2021 #6 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
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