小编Akk*_*kki的帖子

使用 Android Studio 3.XX,将本地 .AAR 文件添加到 Gradle 构建不起作用

使用 Android Studio 3.XX,将本地 .AAR 文件添加到 Android 项目不起作用(构建成功但运行时出现异常)

我尝试下面的方法(摘自参考来源:/sf/answers/1632847821//sf/answers/1742607121/等),但没有为我工作:

1. Import the local aar file:
   (I) File>New>New Module>Import the .AAR Package [On "Finish" click the .AAR gets included automatically into settings.gradle file as below:
       include ':app', ':myAAR'
   (II) Add AAR module dependency in app level build.grdle file as below:
       implementation project(":myAAR")

2. Using flatDir method:
   (I) keep aar file in libs folder
   (II) Add flatDir{dirs 'libs'} into the project level build.gradle file as below:
        allprojects { …
Run Code Online (Sandbox Code Playgroud)

android gradle build.gradle android-gradle-plugin aar

2
推荐指数
1
解决办法
8666
查看次数