简体   繁体   中英

Libs add dependency android

I'm facing an issues about import aar file, which compile another one, and IDE request compile them also. Here is my problem: I create a module, it's "mylibs". Mylibs compile another one. In my case is timber (libs about logging). Then i create a aar file from Mylibs and import it in mainProject by below code:

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

After rebuilt, IDE request me must be import timber also. I dont understand why i need import timber lib ?

aar files do not include dependencies. If they are shipped through a repository, there usually is a pom file in the same repo which describes the dependencies. In this case gradle can resolve transitive dependencies automatically.

But if you ship an aar locally, there are no informations on dependencies available, so you have to include them manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM