Include AAR dependency in Android Library Project

前端 未结 4 1911
北荒
北荒 2021-02-06 10:16

In my Android Studio Gradle project I use several libraries, whereas one library should use a local AAR file as dependency. I used the popular solution to include the AAR file a

4条回答
  •  醉酒成梦
    2021-02-06 10:21

    Already found the solution. It looks like the AAR dependencies are all moved together, so the main project tries to resolve AAR dependency in its 'libs' directory, where it obviously does not exist. What you need to do is define more accurately where each module that depends on the library with the AAR file can find it relative to its path, e.g.

    dirs project(':my-library-project').file('libs')

提交回复
热议问题