Android(安卓)Studio使用build.gradle引入github开源库
16lz
2022-06-12
一般只要在build.gradle中标签dependencies添加开源库,如下
dependencies { debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' // or 1.4-beta1 releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1 testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1 }
但是需要注意的是,应用中引用的仓库,如jcenter和mavenCentral,有的开源库只在其中有,如果编译通不过,可以在这两个仓库切换试试
mavenCenter和JCenter的区别
http://blog.sina.com.cn/s/blog_72ef7bea0102vvqg.html
更多相关文章
- Cocos2d-x教程(38)-iOS移植Android
- Android应用程序组件Content Provider应用实例(5)
- 解决Could not find method android() for arguments问题
- cocos2d-x学习之旅(四):1.4 使用eclipse编译Android(安卓)C++
- Android架构分析之JNI
- 配置android jni开发环境
- Android(安卓)编译SurfaceFlinger测试程序resize
- 怎么在android的XML文件里加入凝视
- dex.force.jumbo和Java heap space的问题