我每次運行代碼時都會收到此執行錯誤,並且'googleservices.json'出現在我的應用程序文件夾中。我的SDK版本也更新但它仍然給錯誤在這行代碼:Android:「googleservices.json」丟失?
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
錯誤消息:
Error:Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot
function without it.
Searched Location:
C:\Users\hp\AndroidStudioProjects\Friendly Chat\app\src\debug\google-
services.json
C:\Users\hp\AndroidStudioProjects\Friendly Chat\app\google-services.json
,這是我的build.gradle代碼。
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'
// Displaying images
compile 'com.github.bumptech.glide:glide:3.6.1'
}
apply plugin: 'com.google.gms.google-services'
https://developers.google.com/android/guides/google-services-plugin – Yoni
確保它的名字是一樣的「 google-services.json「 – WitVault
@WitVault名稱相同。我仍然收到這個錯誤。 –