FirebaseMessagingService Resources$NotFoundException

2024-05-14 20:18

本文主要是介绍FirebaseMessagingService Resources$NotFoundException,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

记录使用微信资源包混淆插件引发的血案


android.content.res.Resources$NotFoundException
String resource ID #0x0
com.google.firebase.messaging.FirebaseMessagingService.f(SourceFile:8)
android.content.res.Resources.getText(Resources.java:360)
android.content.res.MiuiResources.getText(MiuiResources.java:97)
android.content.res.Resources.getString(Resources.java:453)
android.content.Context.getString(Context.java:587)
c.m.b.s.a.b(SourceFile:24)
c.m.b.s.a.b(SourceFile:3)
c.m.b.s.c.a(SourceFile:5)

这个错误的引发找了好久,看日志就是FirebaseMessagingService导致的,但没那么简单。上个版本为了项目的安全,做了混淆、微信资源文件混淆、 加固,上报后崩溃直线上升。Google了才知道原来是因为这—>

I found the problem.
Firebase load a string with name and not with R.string….
int var5 = var0.getResources().getIdentifier(“fcm_fallback_notification_channel_label”, “string”, var0.getPackageName());
Then Dexguard remove this string.With these two lines in the dexguard configuration you specify to keep the string above and all the strings that start with “fcm_”
-keepresources string/fcm_fallback_notification_channel_label
-keepresources string/fcm_*

这样只能暂时放弃资源 文件的混淆了,怕以后再出问题,加入白名单也不是解决问题的方法。不知道谁有好的办法吗

这篇关于FirebaseMessagingService Resources$NotFoundException的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/989742

相关文章

eclipse maven工程中src/main/resources目录下创建的文件夹是包图标的解决方法

转载:https://blog.csdn.net/luwei42768/article/details/72268246 如图:在src/main/resources目录下创建的文件夹却以包的图标显示 修改方法: 入下图,按顺序1 ,2,3,4操作,把3处remove,在4处添加** 修改后如下: 然后点击完成后,文件夹图标显示正常了

rosdep问题 pkg_resources.DistributionNotFound: The 'rosdistro=0.7.5' distribution

问题1 rosdep出现错误 pkg_resources.DistributionNotFound: The 'rosdistro>=0.7.5' distribution 解决方法 pip install rosdistro==0.7.5 -i https://pypi.tuna.tsinghua.edu.cn/simple 问题2 roscore出现错误 Invalid <par

一篇搞懂classpath,resources

Classpath(类路径)在Java开发中是一个非常重要的概念,它指定了Java虚拟机(JVM)和Java编译器寻找类文件和包的位置。具体来说,Classpath告诉Java执行环境在哪些目录下可以找到所要执行的Java程序所需要的类或者包。这些目录可以是文件系统中的普通目录,也可以是包含编译后的Java类文件(.class文件)的JAR文件或ZIP文件。 Classpath的作用 类加载

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_

机型:coolpad 5951 <span style="color:#444444;">java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yckj.ycsafehelper/com.yckj.ycsafehelper.activity.MainActivity}: android.view.I

SpringBoot下获取resources目录下文件的常用方法

哈喽,大家好,今天给大家带来SpringBoot获取resources目录下文件的常用方法,示例中的方法是读取resources目录下的txt和xlsx文件,并将xlsx导出到excel的简单写法。完整代码放在最后。 通过this.getClass()方法获取 method1 - method4都是通过这个方法获取文件的写法,这四种写法在idea中都可以正常运行,jar包执行后method1和

Java8-try-with-resources语句

在 Java 8 中,try-with-resources 语句仍然是处理自动关闭资源的有效方式。下面我将详细介绍 Java 8 中 try-with-resources 语句的使用方法和注意事项。 try-with-resources 语句的基本语法 try (Resource resource = new Resource()) {// 使用资源} catch (Exception e

eclipse创建maven项目java resources有红叉

1.修改项目的jdk版本与机器中的jdk版本一致,右键项目 -> Properties -> Project Facets -> 修改Java Version -> 保存。 2. 修改后如果还报错,右键项目 -> Maven -> Update Project Configuration。

3、Unity【基础】Resources资源场景动态加载

文章目录 一、Resources资源动态加载1、Unity中特殊文件夹1、工程路径获取2、Resources资源文件夹3、StreamingAssets流动资源文件夹4、persistentDataPath持久数据文件夹5、Plugins插件文件夹6、Editor编辑器文件夹7、默认资源文件夹StandardAssets 2、Resources同步加载1、Resources资源动态加载的

CSS Resources

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference https://www.w3.org/Style/CSS/ https://docs.webplatform.org/wiki/css http://caniuse.com/ http://www.zhangxinxu.com/wordpress/category/css/

maven导入报错,eclipse项目中Java Resources 出现小红叉

我出现了一次,做maven项目时候,导入项目方法用错了,我用的maven》Existing Maven Projects导入出错,然后使用maven》Existing Projects into Workspace导入后就好了。希望对你有帮助。