构建针对 API 与主模块不同的库

Build library targeting different API then main module

我有一个基于 webview 的图书馆项目。它以 API 18 为目标,因为我需要一个稳定的库,它不依赖于 webview 更新(来自 API 19 webview 独立更新)并且将继续正常工作。

但正因为如此,我的主模块也必须以 API 18 为目标。如果我使用更高的目标 API,我的库将自动以它为目标并且可以在下次更新时被破坏。

是否可以构建针对 API 与主模块不同的库?例如主模块目标 API 23 和库目标 API 18.

Is it possible to build library targeting different API then the main module? For example main module targets API 23 and library targets API 18.

没有意义。

最终应用程序在清单文件中只定义了一个目标。
您的 apk 中没有单个模块。