Android Question Error in Building App Based on Firebase Services

Adamdam

Active Member
Licensed User
Longtime User
Greetings,

I try now to run with firebase like in the link:
- https://www.b4x.com/android/forum/t...s-firebase-cloud-messaging-fcm.67716/#content
- https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/
I follow all steps,
but i have error in compilation as:
"
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.00s)
Organizing libraries. Error
Maven artifact not found: com.google.firebase/firebase-crash
"
I try to go with steps in the following link to fix this error,
https://www.b4x.com/android/forum/t...-not-found-com-google-firebase.68893/#content
but fail to fix it,

Can you help me to run application with firebase like in the first link

Thanks in advance
 

Adamdam

Active Member
Licensed User
Longtime User
Thank you very much Erel for your help,
The compilation completed.

But the App abnormally terminated at this function
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")



The logger give this error:
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
firebasemessaging_subscribetotopics (java line: 228)
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' appears in /data/app/fbr1.example--Ng9szRvYySJtSwjMuOXzA==/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at fbr1.example.firebasemessaging._subscribetotopics(firebasemessaging.java:228)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
--------- beginning of crash
firebasemessaging_subscribetotopics (java line: 228)
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' appears in /data/app/fbr1.example--Ng9szRvYySJtSwjMuOXzA==/base.apk)
at anywheresoftware.b4a.objects.FirebaseNotificationsService$FirebaseMessageWrapper.SubscribeToTopic(FirebaseNotificationsService.java:130)
at fbr1.example.firebasemessaging._subscribetotopics(firebasemessaging.java:228)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1154)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)


on the other hand, the java test program (sender) return success.
hope to find error and solve it

Thanks in advance.
 
Upvote 0
Top