Fcm integration getting the exception(Fcm 集成出现异常)
问题描述
我正在处理 FCM
集成,但得到 java.lang.ClassNotFoundException:在路径上找不到类service.MyFirebaseMessagingService":DexPathList[[zip file/data/app/com.rk.servicepractise-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64,/system/lib64]]
I am working on the FCM
integration but getting the java.lang.ClassNotFoundException: Didn't find class "service.MyFirebaseMessagingService" on path: DexPathList[[zip file "/data/app/com.rk.servicepractise-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
我已经搜索了它,但还没有找到正确的解决方案,请检查我下面的代码,让我知道我在哪里做错了吗?
I have searched it about but did not get the proper solution yet,Please check my code below and let me know where am i doing wrong?
请用 gradle
检查我的 classes
和 manifest
文件,请帮我解决这个问题.
我的第一个类是 MyFirebaseInstanceIDService
,它扩展了 FirebaseInstanceIdService 类
Please check my classes
and manifest
file with gradle
, Please help me to short out from this problem.
My first class that is the MyFirebaseInstanceIDService
which extends FirebaseInstanceIdService class
还有一个扩展 FirebaseMessagingService
类的 Fcm
类,如下所示:-
And one more class for the Fcm
that extends FirebaseMessagingService
class which are as follow:-
下面是此 Fcm
我使用的 gradle
如下 Module:app:-
And the gradle
which i am using for it as follow Module:app:-
build.gradle 与 Project:ProjectName
以下是我得到的 Exception:-
已编辑如果您遇到同样的问题,请点击此链接,谢谢@Marcin Orlowski ...链接:-点击这里
EDITED Please follow this link whenever u become stuck in the same problem thanks @Marcin Orlowski ...Link:-Click here
推荐答案
只需在 Mainfest
文件中的 Service
之前添加点 (.).
Just add dot (.) before Service
in your Mainfest
file.
换句话说,以下方法可以解决问题:
In other words, the following does the trick:
这篇关于Fcm 集成出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!