原文:Jitpack發佈Android庫出現Direct local .aar file dependencies are not supported when building an AAR - Stars-One的雜貨小窩 問題描述 由於我項目中某個Module引用了本地的aar文件,導致出現了 ...
問題描述
由於我項目中某個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上打包則正常,就沒有過於深究原因了
參考
- 完美解決Direct local .aar file dependencies are not supported when building an AAR. - 拜雨 - 博客園
- Direct local .aar file dependencies are not supported when building an AAR._芝麻棍兒的博客-CSDN博客
- 解決:Direct local .aar file dependencies are not supported when building an AAR._yuanzhihui123的博客-CSDN博客_direct local .aar file dependencies are not suppor
提問之前,請先看提問須知 點擊右側圖標發起提問 或者加入QQ群一起學習 TornadoFx學習交流群:1071184701