1:file->new --> import muldule 这时在app build.gradle里面dependencies 里面就有compile project(
xxxx),并添加上compile ‘名称’(框架中build.gradle version字段)
2:将框架里面的Build.gradle和app里面的build.gradle 的版本统一
3:在project 中的build.gradle ,dependencies里面配置好classpath(从框架中的demo中获得)
通过这三步一般能正确导入,如报错误
1:No service of type Factory 这是由于classpath中
com.github.dcendents:android-maven-gradle-plugin 1.2 的版本号太低了缘故,
解决:再添加一个classpath,放最新的com.github.dcendents:android-maven-gradle-plugi 1.3(这个可以上网查询最新的版本) 并sync new
2:no find pluge com.android.tools.build:gradle:2.2.2 等 ,原因是classpath路径没配置在正确的地方,或者没有配置
解决:在project build.gradle 中dependencies配置好classpath
转载请注明原文地址: https://ju.6miu.com/read-1774.html