问题描述
我看到一些无法解释的Proguard的行为。
I see some unexplained Proguard behaviour.
AFAIK proguard的不重视Android清单。此外,在我的proguard.cfg我没有提到的BroadcastReceiver相关的类。因此,我认为这些应该被剥离出来。
AFAIK proguard does not pay attention to android manifest. Also, in my proguard.cfg I have no mention of BroadcastReceiver related classes. So I assume that those should be stripped out.
不过,我看到的东西斌/ proguard.txt奇怪的:
However I see something strange in bin/proguard.txt:
# view AndroidManifest.xml #generated:784
-keep class com.fiksu.asotracking.InstallTracking { <init>(...); }
和阶级(BroadcastReceiver的的descendand)不会被剥离。原因不说什么对我有意义的:
and that class (descendand of BroadcastReceiver) does not get stripped. Reason does not say anything meaningful to me:
[proguard] com.fiksu.asotracking.InstallTracking
[proguard] is kept by a directive in the configuration.
如果类没有在清单中提到,它就会被剥夺。
If class is not mentioned in manifest, it gets stripped.
将是巨大的知道为什么。
Would be great to know why.
推荐答案
构建过程运行该工具 AAPT
来自动创建配置文件斌/proguard.txt
,根据的AndroidManifest.xml
和其他XML文件。构建过程则配置文件ProGuard的通行证。所以ProGuard的本身确实没有考虑的AndroidManifest.xml
,但AAPT + ProGuard的事情。
The build process runs the tool aapt
to automatically create the configuration file bin/proguard.txt
, based on AndroidManifest.xml
and other xml files. The build process then passes the configuration file to ProGuard. So ProGuard itself indeed doesn't consider AndroidManifest.xml
, but aapt+ProGuard do.
这篇关于为什么ProGuard的处理的AndroidManifest.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!