当前位置:   article > 正文

Android maven仓库_google's maven repository

google's maven repository


Repository: google()

在Android Studio 中的 项目根目录下,build.gradle:

allprojects {
    repositories {
        jcenter()
        google()
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

其中google()的配置,是在Android Studio 3.0,Gradle版本3.0.0以上,才可以使用的。 其对应 Android Maven Repository

该仓库目前有:

android.arch.core

android.arch.lifecycle

android.arch.paging

android.arch.persistence

android.arch.persistence.room

com.android.databinding

com.android.java.tools.build

com.android.support

com.android.support.constraint

com.android.support.test

com.android.support.test.espresso

com.android.support.test.espresso.idling

com.android.support.test.janktesthelper

com.android.support.test.services

com.android.support.test.uiautomator

com.android.tools

com.android.tools.analytics-library

com.android.tools.build

com.android.tools.ddms

com.android.tools.external.com-intellij

com.android.tools.external.org-jetbrains

com.android.tools.internal.build.test

com.android.tools.layoutlib

com.android.tools.lint

com.crashlytics.sdk.android

com.google.android.gms

com.google.android.instantapps

com.google.android.instantapps.thirdpartycompat

com.google.android.support

com.google.android.wearable

com.google.firebase

com.google.gms

io.fabric.sdk.android
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65

在网站上,点击对应项,能查看到其所有可依赖的 版本号

比如,要依赖com.android.support下的customtabs:

- com.android.support
	+ animated-vector-drawable
	+ appcompat-v7
	+ cardview-v7
	+ customtabs
           23.0.0
           23.0.1
           23.1.0
           23.1.1
           ...
           26.0.0
           ...
       ...
...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

依赖的格式:group:name:version

例:implementation 'com.android.support:customtabs:26.0.0'


Repository: maven-aliyun

查看阿里云仓库
可以把 jcenter 注释掉,引入 public 仓库

buildscript {
  repositories {
  	google()
  	maven { url 'https://maven.aliyun.com/repository/public'}
  	//jcenter()
  	//mavenCentral()
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

使用国内镜像aliyun的 maven仓库

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

闽ICP备14008679号