Android Question Firebase SubscribeToTopics error and strange adb issues

Yuri Cinesi

Member
Licensed User
I'm using v1.21 of FirebaseNotifications and I've updated all the recommended items in the sdk manager to their latest version, in the case of firebase-messaging it's 17.1.0, but I still get this error. I even went as far as to delete everything I had downloaded via the SDK manager and downloading it all again, but even that didn't fix it. This only happened following my update from v8.0 of B4A to v8.3.
The offending line is simply fm.SubscribeToTopic("general").

I'm also experiencing some issues with adb where it seems to launch multiple instances - this also only started after updating B4A.

Oh and I've also already accepted the new policies on the firebase console.
 

Yuri Cinesi

Member
Licensed User
Can you post the error?
java.lang.NoSuchMethodError: No virtual method subscribeToTopic(Ljava/lang/String;)V in class Lcom/google/firebase/messaging/FirebaseMessaging; or its super classes (declaration of 'com.google.firebase.messaging.FirebaseMessaging'
 
Upvote 0

Yuri Cinesi

Member
Licensed User
Based on the error message that's what's happening but I'm not using an old version, as evidenced from these screenshots. I've also already updated all recommended items. Oh and I've used the CreateResourceFromFile to update the manifest, also in the screenshots.
 

Attachments

  • Screenshot1.png
    Screenshot1.png
    102.9 KB · Views: 204
  • screenshot2.png
    screenshot2.png
    29.3 KB · Views: 207
Upvote 0

Yuri Cinesi

Member
Licensed User
Is this the exact file path: C:\Program Files (x86)\Anywhere Software\Basic4android\Libraries\FirebaseNotifications.jar ?
Dates aren't in english but you get the gist.

Don't tell me it's the blocked thing. I'll try unblocking it.

EDIT: Didn't change anything.
 

Attachments

  • Properties.png
    Properties.png
    42.7 KB · Views: 194
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is a different error than the one you previously posted...............................................................

You are indeed using the latest version of FirebaseNotifications. Based on the new error you are not using the latest version of firebase-messaging.

My guess is that the IDE is not configured with correct Android SDK. Maybe there are multiple SDKs installed.

I recommend you to follow the installation instructions: https://www.b4x.com/b4a.html
Download the SDK into a new folder and make sure to configure the IDE to use the new SDK.
 
Upvote 0

Yuri Cinesi

Member
Licensed User
I've already reinstalled the SDK as well. There is only one.
The b4a sdk manager points to the correct folder location, I can see the various files installed.

Oh and apologies for the error thing. I was on my phone when I posted that and since they looked identical I just assumed it was the same error as another thread. My bad.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If you want to solve it then follow my instructions. It will work for you like it works for all other developers.
We wasted a lot of time with the incorrect error message. It is impossible to help you like this.

The b4a sdk manager points to the correct folder location, I can see the various files installed.
This is not enough. You need to make sure that the IDE is configured correctly. Follow the installation instructions.
 
Upvote 0

Yuri Cinesi

Member
Licensed User
Fixed. Thank you very much for your help.

Deepest apologies for wasting your time with the incorrect error. I made a mistake and I won't do it again.

For anyone reading this thread and in need of a solution:
It turned out that I had two different instances of AndroidSDK installed. The one that the B4A sdk manager was using, and the one that b4a itself was using. I verified this by comparing the path used by B4A sdk manager (The one for sdkmanager.bat) and the path used by B4A (The one for android.jar). After that it was simply a matter of changing the android.jar path to the android.jar in the correct install (the one B4A sdk manager pointed to).
 
Last edited:
Upvote 0
Top