一、直接引用maven仓库的方法:优点:简单,快捷。缺点:无法修改源码,但能看到源码(从External Libraryes中看)
1.从File-project structure -dependencies -加号 -library搜索添加
或者 从github上找到这个项目的gradle-dependencies,添加到主项目(不是根目录)的build.gradle中,
compile 'com.makeramen:roundedimageview:2.2.0'(不能有冒号,否则会报找不到的错误 failed to resolve:...)
同时添加repositories {
mavenCentral()
}指定maven仓库。
假如第三方库中有和本项目冲突或重复的jar,如v4包,需要用exclude排除:如
compile 'com.czt.mp3recorder:library:1.0.1' exclude group: 'com.android.support'