右键File—— New —— Import Module
选择列子中的开源库项目,选择后可以在Module name修改在你项目中这个开源库的所要显示的名字。之后Finish。
因为我修改了名字所以显示PullLoadMoreRecyclerViewlibrary。
之后要修改PullLoadMoreRecyclerViewlibrary项目中的build.gradle文件中的版本号和你app项目中的版本号相同;
如果出现 Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.这种错误。必须在项目中的build.gradle添加
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
如果找不到版本号,可以复制这句话com.github.dcendents.android-maven,在这里查找就可以查到最新版本了。