Support Topics Documentation Slack YouTube Blog

Unable to instantiate service com.backendless.push.BackendlessFCMService

(Rajasekhar Puligadda) #1

I am getting issue on “unable to instantiate service com.backendless.push.BackendlessFCMService…” on device while send push push notification

My manifest file is as below:

<?xml version='1.0' encoding='utf-8'?>

(Sergey Kukurudzyak) #2

attach manifest file, and show the full message please

(Rajasekhar Puligadda) #3

AndroidManifest.xml (3.4 KB)

Please check once the manifest file

(Sergey Kukurudzyak) #4

Can you please provide full error message

(Rajasekhar Puligadda) #5

java.lang.RuntimeException: Unable to instantiate service com.backendless.push.BackendlessFCMService: java.lang.ClassNotFoundException: Didn’t find class “com.backendless.push.BackendlessFCMService” on path: DexPathList[[zip file “/data/app/com.test.APP-1/base.apk”],nativeLibraryDirectories=[/data/app/com.test.APP-1/lib/arm64, /vendor/lib64, /system/lib64]]
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.backendless.push.BackendlessFCMService” on path: DexPathList[[zip file “/data/app/com.test.APP-1/base.apk”],nativeLibraryDirectories=[/data/app/com.test.APP-1/lib/arm64, /vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
… 8 more
Suppressed: java.lang.ClassNotFoundException: com.backendless.push.BackendlessFCMService
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(
at java.lang.BootClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
… 10 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack tr

(Sergey Kukurudzyak) #6

it seem that you do not include backendless android sdk, because android could not find the class BackendlessFCMService

(Rajasekhar Puligadda) #7

I am using js sdk for backendless, i need to include android sdk too?

(Rajasekhar Puligadda) #8

I have included ‘compile ‘com.backendless:backendless:5.2.4’’ in dependencies of app level gradle file now i am getting fallowing issue

java.lang.NoSuchMethodError: No virtual method toIntent()Landroid/content/Intent; in class Lcom/google/firebase/messaging/RemoteMessage; or its super classes (declaration of ‘’ appears in /data/app/com.test.APP/base.apk)
at com.backendless.push.BackendlessFCMService.onMessageReceived(
at Source)
at Source)
at Source)
at$ Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

(Oleg Vyalyh) #9

i’ve noticed misconfiguration in your manifest.

        <service android:name="com.backendless.push.BackendlessFCMService">
                <action android:name="" />
        <service android:name="com.gae.scaffolder.plugin.MyFirebaseMessagingService">
                <action android:name="" />

As i understood MyFirebaseMessagingService extends BackendlessFCMService.
And you should leave only one service.

(Rajasekhar Puligadda) #10

means i need to remove service with “MyFirebaseMessagingService”

(Rajasekhar Puligadda) #11

Actually to get the device token i have used "", i think due to this the problem comes, can you suggest about this?

(Rajasekhar Puligadda) #12

please suggest how to get device token for push notifications in js sdk?

(Oleg Vyalyh) #13

The discussion have been continued in Slack.
In short words:
We have no solution for ionic framework. To receive device token you should use native code (our android sdk, written in Java). Or you may look for a solution yourself.

(Rajasekhar Puligadda) #14

Presently i am using using js sdk, so i need to convert all things into android sdk?