[英]Build an .aar with all dependencies
I am building an SDK for Android that should be exported as an .aar file. 我正在构建一个Android版SDK,应该导出为.aar文件。
The SDK has a list of dependencies defined in its build.gradle file, for example: SDK具有在其build.gradle文件中定义的依赖项列表,例如:
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services-ads:9.0.2'
My question is: how do i include these libraries in the .aar, so that it is self-contained and does not require the developer using it to add these libraries when using my SDK? 我的问题是:我如何在.aar中包含这些库,以便它是自包含的,并且在使用我的SDK时不需要开发人员使用它来添加这些库?
I have looked everywhere for this, but most answers don't seem to address this issue or don't work. 我到处寻找这个,但大多数答案似乎没有解决这个问题或不起作用。
How do i include these libraries in the .aar 我如何在.aar中包含这些库
Not at all. 一点也不。
An .aar
-file is not intended to contain it's own dependencies .aar
-file不打算包含它自己的依赖项
You should use a dependency management system (like maven or ivy) to distribute your SDK in order to handle transitive dependencies. 您应该使用依赖关系管理系统(如maven或ivy)来分发SDK以处理传递依赖关系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.