gpt4 book ai didi

java - Android Studio Gradle“文件 google-services.json 缺少模块根目录。没有它,Google 服务插件无法运行。”

转载 作者:行者123 更新时间:2023-12-03 06:25:48 28 4
gpt4 key购买 nike

我不断收到此错误:

Error:Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.


buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:2.0.0-beta5'
classpath 'com.google.gms:google-services:2.0.0-beta5'

}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}


android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.example.computing.lincolnopenday"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile('com.twitter.sdk.android:twitter:1.12.1@aar') {
transitive = true;
}


}
apply plugin: 'com.google.gms.google-services'

最佳答案

你不能使用

classpath 'com.android.tools.build:gradle:2.0.0-beta5'



因为最新的是

classpath 'com.android.tools.build:gradle:1.5.0'



https://developer.android.com/tools/revisions/gradle-plugin.html

另外, here是建议是添加

compile 'com.google.gms:google-services:2.0.0-beta5'



用于使用 gradle 构建。

关于java - Android Studio Gradle“文件 google-services.json 缺少模块根目录。没有它,Google 服务插件无法运行。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35523519/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com