我试图建立一个Android版本使用Ant和ProGuard的。 我注释掉在project.properties以下行,尽管说,文件指出,你不应该修改它的评论):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
混淆的时候,我得到了以下注意事项:
[proguard] Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
[proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
我不明白为什么会这样。 这些线可以在默认的ProGuard配置文件($ {} sdk.dir /tools/proguard/proguard-android.txt)中找到:
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
我没有使用谷歌的授权服务,因此类确实不明。 我发现了一个解决方案,通过更新的ProGuard-project.txt摆脱这些注意事项:
-dontnote **ILicensingService
我的问题:这是处理这个正确的方式? 在我看来,这些类不应该被默认总是保留,因为这LIB不是强制的Android项目。 我能想到的唯一的办法实现这一目标是通过默认的配置文件复制到我的项目,除去-keep行,完全忽略了SDK默认的配置文件。 这似乎并不为正确的路要走要么没有。 还是我失去了一些东西?