2017-04-11 69 views
0
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 sync錯誤。Android Studio發生Gradle Sync(SDK)問題

錯誤:(37,13)無法解析:com.android.support:design:24.2.0

錯誤:(38,13)無法解析:com.android.support:appcompat-v7 :24.2.0

可有人請告訴我需要改變什麼來得到這個運行。它一直在工作,直到我更新Android Studio。

在此先感謝

回答

0

UPDATE

我想通了,截至3月出現了一個新的存儲庫更新

所以我只是改變

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這個實際編制,我希望這個版本是非常有用的人誰可能會遇到此作爲其唯一的新

0

更改

buildToolsVersion '25.0.0' 

buildToolsVersion '24.2.0' 

我希望它幫你!

+0

現在我得到這個,錯誤:無法找到生成工具版本24.2.0 –

+0

任何其他建議? –