Transitive Library dependencies are not found in the application

后端 未结 1 1815
无人及你
无人及你 2021-01-16 08:41

Say I have a library module which contains some 3rd party libraries like OkHttp. When I include this library in my application I was unable to use these 3rd party libraries.

相关标签:
1条回答
  • 2021-01-16 09:39

    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.

    It doesn't make sense:

    compile (name:'library-name', ext:'aar'){
        transitive=true
    }
    

    because the aar is without a pom file which describes the dependencies, then gradle is unable to add any dependencies because it can't know them.

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