Add local android support library to a gradle build without using SDK Deployer to add to mavenLocal

一个人想着一个人 提交于 2019-12-12 04:43:32

问题


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'
    }
}


来源:https://stackoverflow.com/questions/33816160/add-local-android-support-library-to-a-gradle-build-without-using-sdk-deployer-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!