项目启动突然遇到:
Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.3/runtime-1.0.3.aar
搞了半天 找到解决办法 :
在Build.gradle 中 :
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://tokbox.bintray.com/maven' }
maven { url "https://jitpack.io" }
jcenter() //在上面
mavenCentral() //在下面
}
}