Closed changety closed 7 years ago
收到,我晚些时候确认一下。
我尝试在example复现,并没有出现问题。你可以看下AndResGuard-example的情况是否和你描述的相符。
这个问题可能并不一定能复现,我自己测试也没有复现,但确实收集到过这个异常
可否把异常的callstack以及机型,sdk版本发出来呢?
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f080016 at android.content.res.Resources.getResourcePackageName(Resources.java:1868) at android.content.res.Resources.getYLThemeString(Resources.java:2891) at android.content.res.Resources.getText(Resources.java:253) at android.content.res.Resources.getString(Resources.java:349) at android.content.Context.getString(Context.java:337)

多谢反馈,我再排查一下问题。
我也遇到同样的问题,在app 运行umeng分享的时候 crash. 1.异常信息:
android.content.res.Resources$NotFoundException: File res/mipmap-xxxhdpi-v4/ic_launcher.png from drawable resource ID #0x7f030000
at android.content.res.Resources.openRawResourceFd(Resources.java:1315)
at com.umeng.socialize.media.g$g.a(SourceFile:546)
at com.umeng.socialize.media.g.i(SourceFile:219)
at com.umeng.socialize.media.c.b(SourceFile:120)
at com.umeng.socialize.media.c.a(SourceFile:61)
at com.umeng.socialize.handler.UMQQSsoHandler.a(SourceFile:327)
at com.umeng.socialize.handler.UMQQSsoHandler.g(SourceFile:304)
at com.umeng.socialize.handler.UMQQSsoHandler.a(SourceFile:99)
at com.umeng.socialize.c.a.a(SourceFile:404)
at com.umeng.socialize.h.a(SourceFile:208)
at com.umeng.socialize.h.b(SourceFile:198)
at com.umeng.socialize.common.d.run(SourceFile:134)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
at android.content.res.AssetManager.openNonAssetFdNative(Native Method)
at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:426)
2.引用代码:
.withMedia(new UMImage(activity, R.mipmap.ic_launcher))
3.白名单:
andResGuard {
mappingFile = file("./resource_mapping.txt")
use7zip = true
useSign = true
keepRoot = false
whiteList = [
// your icon
// "R.drawable.icon",
"R.mipmap.*",
// for fabric
"R.string.com.crashlytics.*",
4.机型:Nexus 6 - 6.0系统
每次都必现,添加白名单了,后面还是提示可能被压缩,我不知是不是白名单规则填写有误?
@thearyong 多谢反馈,ref #92
@simpleton 感谢,找到原因了,是我之前把ic_launcher.png经过https://tinypng.com 处理过一次,并不是AndResGuard白名单问题。 解决方法:替换原来的ic_launcher.png,正常运行
@thearyong ,请问这个报错和 https://tinypng.com 处理过有什么关系啊
比如: 下面的同名字符串,在运行时会报错