apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 24
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.google.firebase.udacity.friendlychat"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
//firebase
// Displaying images
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.google.firebase:firebase-database:10.2.0' // adding database
dependency to SDK
}
apply plugin: 'com.google.gms.google-services'
这些是我收到的gradle同步错误。
错误:(37, 13(无法解析: com.android.support:design:24.2.0
错误:(38, 13(无法解析:com.android.support:appcompat-v7:24.2.0
有人可以告诉我需要更改什么才能使其运行。它一直在工作,直到我更新了Android Studio。
提前致谢
更改
buildToolsVersion '25.0.0'
自
buildToolsVersion '24.2.0'
希望对您有所帮助!
更新
我想通了,截至三月,有一个新的存储库更新
所以我干脆改了
buildToolsVersion '24.0.1'
我将构建版本更改为
buildToolsVersion '25.0.2' //this is actually the latest as of 12/4/17
然后将依赖项从
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
自
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
现在我没有错误,我的 gradle 实际上构建了,我希望这对可能遇到它作为唯一新的人有用