android - 使用依赖项构建 AAR

标签 android gradle plugins aar

我想构建带有依赖项的 .AAR。我一直在寻找很多,但没有任何效果。话题太老了我意识到生成的 .AAR 应该在里面有 classes.jar 并且有包含 .class 文件的目录。但我不知道如何在 gradle 中自动化这个过程。

最佳答案

Android 工具不支持它。有一个 issue open请求 Google 实现它(随时给它加注星标以表示您的支持并帮助 Google 对其进行优先排序)。

与此同时,有两个插件试图修复或解决这种缺乏支持的问题,但对不同功能的支持有限:

因此,如您所见, future 看起来并不光明。

另见 this article获取更多信息。

关于android - 使用依赖项构建 AAR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56218761/

相关文章:

plugins - 编写可发布的 buildSrc Gradle 插件

ios - 适用于 Mac 上 Windows 的 Cordova 插件添加/删除

java - 我可以在java应用程序中集成android代码吗?

android - PieChart achartengine 中的水平图例

android-studio - 编译Gradle错误 “name must not be null”

android - Gradle - Windows 中缓存库的位置

android - 语音搜索/SpeechRecognizer 在快速启动/停止收听时崩溃

android - android :height and android:layout_height? 有什么区别

java - 无法解析 Room 依赖项

plugins - 巴别塔 : replaceWithSourceString giving Unexpected token (1:1)