下面看图说话:
1.首先是 File--New--Import Module
2.然后就会看到下面的界面,选择自己要用的第三方库或library:
3.Finish后可能会有下面的错误:
Android 添加Library出现错误Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.
没有关系,有错就来解决呗,解决办法:在project目录下的build.gradle 添加如下代码
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
4.然后运行又开始出现新的问题了,Error:(2, 0) No service of type Factory available in ProjectScopeServices.
那就在project目录下的build.gradle 里加上下面的代码:
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
5.别忘了下面的操作:
希望对大家有用