New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不同分辨率的string.xml,资源混淆压缩后会出现ResourceNotFound的异常 #100
Comments
收到,我晚些时候确认一下。 |
我尝试在example复现,并没有出现问题。你可以看下AndResGuard-example的情况是否和你描述的相符。 |
这个问题可能并不一定能复现,我自己测试也没有复现,但确实收集到过这个异常 |
可否把异常的callstack以及机型,sdk版本发出来呢? |
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f080016 |
多谢反馈,我再排查一下问题。 |
我也遇到同样的问题,在app 运行umeng分享的时候 crash. 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白名单问题。 |
@thearyong ,请问这个报错和 https://tinypng.com 处理过有什么关系啊 |
比如:
下面的同名字符串,在运行时会报错
The text was updated successfully, but these errors were encountered: