设为首页 加入收藏

TOP

Jitpack发布Android库出现Direct local .aar file dependencies are not supported when building an AAR
2023-07-23 13:32:03 】 浏览:91
Tags:Jitpack 发布 Android Direct local .aar file dependencies are not supported when building AAR

原文:Jitpack发布Android库出现Direct local .aar file dependencies are not supported when building an AAR - Stars-One的杂货小窝

问题描述

由于我项目中某个Module引用了本地的aar文件,导致出现了此问题

> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :ocr project caused this error: /home/jitpack/build/ocr/libs/ocrsdk.aar

解决方法

把引用的implementation改为provided即可,如下图所示

网上找到了大都是是要去改setting.gradle,实际上改了还发现出现了其他错误。。。

如果想要验证是否还有错误,可以通过Gradle右侧的菜单来触发发布aar的操作

实际上,我测试的发布aar,还是出现了报错,不过是资源文件里的某个颜色定义找不到,但用Jitpack上打包则正常,就没有过于深究原因了

参考

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇adb-利用bat批处理文件,实现app.. 下一篇Web应用怎样获取Access Token?

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目