My AAR includes a picasso library, but in my java code can't find picasso.
Asked
Active
Viewed 907 times
1
-
[This](http://stackoverflow.com/questions/24506648/adding-local-aar-files-to-gradle-build-using-flatdirs-is-not-working) may help you – webo80 Dec 15 '15 at 08:43
-
Thanks, but I'm not the same issue – Cong Chen Dec 15 '15 at 09:11
3 Answers
0
The aar file doesn't contain the nested 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.
In your case you have to add in your app (not the library):
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
Gabriele Mariotti
- 250,295
- 77
- 670
- 690
-
Sorry, I don't really understand what you say.Can I understand the library on aar file can't be used by other moudle – Cong Chen Dec 15 '15 at 08:55
-
I am saying that the aar file doesn't contain the picasso library and all other libraries used. – Gabriele Mariotti Dec 15 '15 at 09:26
0
Why you not using only
compile 'com.squareup.picasso:picasso:2.5.2'
Tran Vinh Quang
- 585
- 2
- 9
- 30
-
-
If your aar file has zip picasso library, you can use this file. But in this case, your file is cannot. – Tran Vinh Quang Dec 15 '15 at 09:42
0
If you use the gradle maven plugin to deploy the aar to a local repo, then you can get transitive dependencies to work. Here's how to do that:
Community
- 1
- 1
Stan Kurdziel
- 5,108
- 1
- 38
- 40