参见英文答案 > How to include JAR dependency into an AAR library 3个
我正在尝试在Android Studio中构建一个arr包.此软件包包含Zendesk的dependecies:
allprojects {
repositories {
maven { url 'https://zendesk.artifactoryonline.com/zendesk/repo' }
}
}
compile (group: 'com.zendesk', name: 'sdk', version: '1.7.0.1') {
transitive = true
}
compile (group: 'com.zopim.android', name: 'sdk', version: '1.3.1.1') {
transitive = true
}
我想为Unity3d项目构建这个包.此软件包应包含Zendesk的所有依赖项(transitive = true属性).当我打开aar文件时,Zendesk没有依赖关系.怎么了?
解决方法:
默认情况下,AAR不包含任何依赖项.如果要包含它们,则必须将这些库从artifactory / cache文件夹复制到包中,方法是手动执行,或者此任务可能对您有所帮助:https://*.com/a/33539941/4310905