8***@qq.com
8***@qq.com
  • 发布:2025-03-11 17:05
  • 更新:2025-06-29 06:38
  • 阅读:212

安卓本地打包uniappx关于arr依赖问题

分类:uni-app x

报错内容如下:> Task :uniappx:bundleReleaseLocalLintAar FAILED
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 :uniappx project caused this error: C:\Users\zgl20\Desktop\testapplication\uniappx\libs\android-gif-drawable-1.2.28.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\app-common-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\app-runtime-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\breakpad-build-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\dcloud-layout-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\framework-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-exit-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getAccessibilityInfo-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getAppAuthorizeSetting-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getAppBaseInfo-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getDeviceInfo-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getSystemInfo-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-getSystemSetting-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-openAppAuthorizeSetting-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-prompt-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-rpx2px-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-storage-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uni-theme-release.aar, C:\Users\zgl20\Desktop\testapplication\uniappx\libs\uts-runtime-release.aar
目录结构在附件

2025-03-11 17:05 负责人:无 分享
已邀请:
8***@qq.com

8***@qq.com (作者)

版本如下

z***@163.com

z***@163.com

同遇到这个问题,是因为apg版本不允许引入本地arr了

z***@163.com

z***@163.com

已找到解决方案在uniappx的build.gradle模块中把implementation fileTree(include: ['.aar'], dir: './libs') 更改为compileOnly fileTree(include: ['.aar'], dir: './libs')

要回复问题请先登录注册