Android 库集成和 APP 大小

Android Library integration and APP size

我正在使用 AppIntro 库,并按照通常的建议通过 build.gradle 将其集成。 但是由于库 classes 是这样锁定的,我希望能够手动编辑每个 class 我有以下问题。

1. 以某种方式包含 AppIntro 等库的方法是什么 我将能够编辑每个 class.

2. 因为我想最小化我的 Android 应用程序的最终大小,库的不同集成是否会在这里产生影响或在构建过程中产生魔力排除不需要的东西?

如果下载完整的 github .zip 是必要的,甚至是正确的下载方式,我根本不会冲浪,因为它还包括一个示例应用程序和其他不必要的东西。

  1. What is the go to way of including a library such as AppIntro in a way that I will be able to edit every class.

获取源代码并添加到您的项目作为单独的模块

  1. Since I want to minimize the final size of my Android App, does different integration of libraries have an impact here or does the magic during build process exclude stuff that is not needed

ProGuard 将去除所有未被引用的库代码(还有你自己的代码 :)(这就是为什么有时告诉它不要这样做很重要,如果你需要依赖反射来工作的代码。