android - proguard 会删除 android.jar 中未使用的类吗?

标签 android proguard

假设我正在使用 android api 16 开发应用程序,我的应用程序将包含 android.jar。我将从 jar 文件中导入几个类。

我会通过配置 proguard 在 Release模式下启用 proguard。 proguard 是否也删除 android.jar 中未使用的类?

编辑:

我的项目的属性文件

android.library.reference.1=../actionbarsherlock

那么当将所有内容打包到 .apk 时,proguard 会从我的库项目中删除未使用的类吗?

最佳答案

Proguard 不会从库中删除任何内容。请参阅 Proguard website. 中的图表和引用

ProGuard requires the library jars (or wars, ears, zips, or directories) of the input jars to be specified. These are essentially the libraries that you would need for compiling the code. ProGuard uses them to reconstruct the class dependencies that are necessary for proper processing. The library jars themselves always remain unchanged. You should still put them in the class path of your final application.

关于android - proguard 会删除 android.jar 中未使用的类吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15992799/

相关文章:

java - proguard 和 jdom 错误编译 android APK

java - 启用 Proguard 时 Android 应用程序崩溃

android - Geofire 正在触发 onGeoQueryReady 而不是 onKeyEntered

android - 如果 Activity 停止,则通知服务

android - 原子更新多个相关表

android - 发布版本的不同版本代码

java - 使用 Proguard 将 Guava 嵌入到另一个 jar 中

java - 如何使用 Proguard 生成的 mapping.txt 对 jar 文件进行反混淆?

android - 如何给微调器的位置零提示值?

Android,如何获取文件夹中所有文件的列表?