Android Studio使用build.gradle引入github开源库
16lz
2021-01-23
一般只要在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
更多相关文章
- 在jitpack创建Android仓库
- 使用本地仓库实现最新版ReactNative集成Android
- Android设备预计将超微软
- 微软之鉴:Google不会将Android与Chrome OS融合?
- Android 发布项目到私服Nexus仓库
- 【安卓】关于 Android 默认字体以及对比微软雅黑字体
- 微软发布 mircosft remote desktop for android
- Android连接SQLServer详细教程(数据库+服务器+客户端),并在微软Azur
- 专利敲诈——微软对Android痛下杀手的背后