当前位置:   article > 正文

android 开发配置阿里云maven仓库_android 阿里云maven仓库地址

android 阿里云maven仓库地址

每次开发android 都得面临各种依赖下载失败的问题,每次都得去网上搜各种仓库地址,这里记录一下,省的找不着。在项目根目录下build.gradle中配置的代码如下:

  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. maven { url 'https://maven.aliyun.com/repository/central' }
  5. maven { url 'https://maven.aliyun.com/repository/jcenter' }
  6. maven { url 'https://maven.aliyun.com/repository/google' }
  7. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  8. maven { url 'https://maven.aliyun.com/repository/public' }
  9. maven { url 'https://jitpack.io' }
  10. google()
  11. jcenter()
  12. }
  13. dependencies {
  14. classpath "com.android.tools.build:gradle:4.1.1"
  15. // NOTE: Do not place your application dependencies here; they belong
  16. // in the individual module build.gradle files
  17. }
  18. }
  19. allprojects {
  20. repositories {
  21. maven { url 'https://maven.aliyun.com/repository/central' }
  22. maven { url 'https://maven.aliyun.com/repository/jcenter' }
  23. maven { url 'https://maven.aliyun.com/repository/google' }
  24. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  25. maven { url 'https://maven.aliyun.com/repository/public' }
  26. maven { url 'https://mapbox.bintray.com/mapbox' }
  27. maven { url 'https://jitpack.io' }
  28. maven {
  29. // 专为Mapbox配置
  30. url 'https://api.mapbox.com/downloads/v2/releases/maven'
  31. authentication {
  32. basic(BasicAuthentication)
  33. }
  34. credentials {
  35. // Do not change the username below.
  36. // This should always be `mapbox` (not your username).
  37. username = 'mapbox'
  38. // Use the secret token you stored in gradle.properties as the password
  39. password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
  40. }
  41. }
  42. google()
  43. jcenter()
  44. }
  45. }
  46. task clean(type: Delete) {
  47. delete rootProject.buildDir
  48. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/592879
推荐阅读
相关标签
  

闽ICP备14008679号