Gradle: download Dependencies of included aar-library

前端 未结 1 611
面向向阳花
面向向阳花 2021-02-07 22:30

I wrote a library-project cameraBarcodeScanner that is built into an aar file. This library has the following dependencies defined in its build.gradle:



        
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 22:43

    The aar file doesn't contain the nested (or transitive) dependencies and doesn't have a pom file which describes the dependencies used by the library.

    It means that, if you are importing a aar file using a flatDir repo you have to specify the dependencies also in your project.

    You should use a maven repository (you have to publish the library in a private or public maven repo), you will not have the same issue.
    In this case, gradle downloads the dependencies using the pom file which will contains the dependencies list.

    0 讨论(0)
提交回复
热议问题