我们正在使用dexguard,并且在dexguard-project.txt中也有以下设置
-keepresourcefiles res/**
-keepresourcexmlattributenames res/**
-keepresources res/**我还尝试了提供res/values/strings.xml s.xml的变体,如下所示:
-keepresourcefiles res/*/strings.xml
-keepresourcexmlattributenames res/*/strings.xml
-keepresources res/*/strings.xml和
-keepresourcefiles res/values/*
-keepresourcexmlattributenames res/values/*
-keepresources res/values/*等
在路径中。但是字符串的键值变得模糊了。
context.getResources().getIdentifier(key, STRING_FOLDER,context.getPackageName()); 返回0。(其中key是字符串值)。
我也试过
-dontshrink避免字符串模糊的正确方法是什么?
发布于 2016-11-21 21:22:50
为了防止字符串资源被DexGuard混淆/内联/收缩,您需要添加以下规则:
-keepresources string/**-keepresources指令的格式如下:
-keepresources [resourceType]/[resourceKey]https://stackoverflow.com/questions/40720331
复制相似问题