Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 错误:任务';的执行失败:app:processDebugGoogleServices_Android_Android Studio_Google Play Services_Build.gradle - Fatal编程技术网

Android 错误:任务';的执行失败:app:processDebugGoogleServices

Android 错误:任务';的执行失败:app:processDebugGoogleServices,android,android-studio,google-play-services,build.gradle,Android,Android Studio,Google Play Services,Build.gradle,我在安卓工作室有个bug。 新活动空白应用程序,我添加“build.gradle(项目)” 在“build.gradle(应用)”中 编译,错误为: 错误:任务执行失败:应用程序:ProcessDebuggGoogleServices。 Com.google.gson.stream.MalformedJsonException:第28行第20列应有名称” 我重新安装了Android Studio、SDK,而且总是一样的,有什么想法吗?看起来你正在应用程序中进行谷歌登录。 apply插件:“com

我在安卓工作室有个bug。 新活动空白应用程序,我添加“build.gradle(项目)”

在“build.gradle(应用)”中

编译,错误为:

错误:任务执行失败:应用程序:ProcessDebuggGoogleServices。 Com.google.gson.stream.MalformedJsonException:第28行第20列应有名称”


我重新安装了Android Studio、SDK,而且总是一样的,有什么想法吗?

看起来你正在应用程序中进行谷歌登录。
apply插件:“com.google.gms.google services”
语句将尝试解析您的
google services.json
文件(通常位于应用程序文件夹中)
打开该文件并在第28行查找任何格式错误的JSON。

(可能会将其复制/粘贴到中)。

有时编辑器用于修改“google services.json”也会导致此问题。我使用OS X TextEdit进行编辑,问题发生了,但在我使用UltraEdit后,问题得到了解决。我认为可能是文件编码问题。

可能重复Estás Digidocado、revisa bien、el error lo puedes replicar fácilmente al crear un nuevo proyecto con actividad en blanco、agregar el classpath y apply plugin;编译错误。我管理了Google SignIn的操作,删除了“apply plugin:'com.Google.gms.Google services''。我不知道会产生什么后果,但到目前为止获得了用户数据。注意。
 dependencies {
     classpath 'com.android.tools.build:gradle:2.0.0-alpha9'
     classpath 'com.google.gms: google-services: 2.0.0-alpha9'
 }
dependencies {
     compile FileTree (dir: 'libs', include: ['* .jar'])
     compile 'com.android.support:appcompat-v7:23.0.1'
     compile 'com.android.support:design:23.0.1'

     // Dependency for Google Sign-In
     compile 'com.google.android.gms: play-auth-services: 8.4.0'
}

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