I'm having trouble figuring out how to add android support library to a gradle build, without using SDK Deployer to add the library to mavenLocal
. The main problem is how to configure the build to use the location on a local file system to resolve support library dependencies specified in the build file.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Figured this out. In case anyone else is trying to do the same, you need to add the local support library location to the gradle build repositories
configuration in your build.gradle file, like so (substituting path_to_sdk
, of course):
repositories {
... other repositories ...
maven {
url 'file://path_to_sdk/extras/android/m2repository'
}
}