pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

Android Studio Gradle:錯誤:任務':app:processDebugGoog

Android Studio Gradle: Error:Execution failed for task #39;:app:processDebugGoogleServices#39;. gt; No matching client found for package(Android Studio Gradle:錯誤:任務:app:processDebugGoogleServices的執行失敗.gt;找不到匹配的客
本文介紹了Android Studio Gradle:錯誤:任務':app:processDebugGoogleServices'的執行失敗.>找不到匹配的客戶包的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試按照 Google 提供的示例將我的 google play 服務依賴項升級到 8.4.0

I am trying to upgrade my google play services dependencies to 8.4.0 by following the example Google gives here, but I am getting the following error ('com.example.exampleapp' is a replacement for my app package name):

Error:Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.example.exampleapp'

Project build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
        classpath 'com.google.gms:google-services:2.0.0-alpha3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

Module app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.exampleapp"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    useLibrary 'org.apache.http.legacy'

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.google.android.exoplayer:exoplayer:r1.5.2'
    compile 'com.google.android.gms:play-services-auth:8.4.0'
    compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile('com.mapbox.mapboxsdk:mapbox-android-sdk:3.0.0@aar') {
        transitive = true
    }
    compile files('libs/commons-lang3-3.3.2.jar')
}

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

gradle-wrapper.properties:

#Fri Jan 01 08:23:56 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-2.8-all.zip

Any ideas as to why gradle can't recognize my own app package name?


EDIT:

Ok, I'm getting different errors this time.

Based on the link Shawn Thye provided, I added this to the bottom of app/build.gradle:

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

and leaving everything else what I listed previously I got this error:

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]
/Users/user/Documents/AndroidStudio/ExampleApp/app/build.gradle
Error:(1, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in /Users/user/Documents/AndroidStudio/ExampleApp/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip
Information:BUILD FAILED
Information:Total time: 0.921 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

and the Gradle console:

Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]

Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/user/Documents/AndroidStudio/ExampleApp/app/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in /Users/user/Documents/AndroidStudio/ExampleApp/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.211 secs

So, then I changed gradle-wrapper.properties as requested to "gradle-2.10-all" and got this error:

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]
google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used.
please apply google-services plugin at the bottom of the build file.
:clean
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library
:app:prepareComAndroidSupportCardviewV72311Library
:app:prepareComAndroidSupportDesign2311Library
:app:prepareComAndroidSupportGridlayoutV72311Library
:app:prepareComAndroidSupportRecyclerviewV72311Library
:app:prepareComAndroidSupportSupportV42311Library
:app:prepareComDigitsSdkAndroidDigits192Library
:app:prepareComFacebookAndroidFacebookAndroidSdk470Library
:app:prepareComGoogleAndroidExoplayerExoplayerR152Library
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library
:app:prepareComMapboxMapboxsdkMapboxAndroidSdk230Library
:app:prepareComTwitterSdkAndroidTweetComposer102Library
:app:prepareComTwitterSdkAndroidTweetUi180Library
:app:prepareComTwitterSdkAndroidTwitter1110Library
:app:prepareComTwitterSdkAndroidTwitterCore162Library
:app:prepareIoFabricSdkAndroidFabric1310Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:processDebugManifest
:app:fabricGenerateResourcesDebug
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Found com.google.android.gms:play-services-auth:8.4.0, but version 8.3.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services-maps:8.4.0, but version 8.3.0 is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.
Information:BUILD FAILED
Information:Total time: 5.724 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

And the Gradle console:

Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]

Configuration on demand is an incubating feature.
google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used.
please apply google-services plugin at the bottom of the build file.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library
:app:prepareComAndroidSupportCardviewV72311Library
:app:prepareComAndroidSupportDesign2311Library
:app:prepareComAndroidSupportGridlayoutV72311Library
:app:prepareComAndroidSupportRecyclerviewV72311Library
:app:prepareComAndroidSupportSupportV42311Library
:app:prepareComDigitsSdkAndroidDigits192Library
:app:prepareComFacebookAndroidFacebookAndroidSdk470Library
:app:prepareComGoogleAndroidExoplayerExoplayerR152Library
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library
:app:prepareComMapboxMapboxsdkMapboxAndroidSdk230Library
:app:prepareComTwitterSdkAndroidTweetComposer102Library
:app:prepareComTwitterSdkAndroidTweetUi180Library
:app:prepareComTwitterSdkAndroidTwitter1110Library
:app:prepareComTwitterSdkAndroidTwitterCore162Library
:app:prepareIoFabricSdkAndroidFabric1310Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:processDebugManifest
:app:fabricGenerateResourcesDebug
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Found com.google.android.gms:play-services-auth:8.4.0, but version 8.3.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services-maps:8.4.0, but version 8.3.0 is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.724 secs

It's asking for the google-services plugin at the bottom of the build file, which it is already, and it's asking me to run 8.3.0 again... which I will do since that's the only thing working right now...

解決方案

"client": [
{
  "client_info": {
    "mobilesdk_app_id": "9:99999999:android:9ccdbb6c1ae659b8",
    "android_client_info": {
      "package_name": "[packagename]"
    }
  }

package_name must match what's in your manifest file. you can find the google-services.json file if you look in the example photo below.

這篇關于Android Studio Gradle:錯誤:任務':app:processDebugGoogleServices'的執行失敗.>找不到匹配的客戶包的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 数码管_LED贴片灯_LED数码管厂家-无锡市冠卓电子科技有限公司 | PCB接线端子_栅板式端子_线路板连接器_端子排生产厂家-置恒电气 喷码机,激光喷码打码机,鸡蛋打码机,手持打码机,自动喷码机,一物一码防伪溯源-恒欣瑞达有限公司 假肢-假肢价格-假肢厂家-河南假肢-郑州市力康假肢矫形器有限公司 | 礼仪庆典公司,礼仪策划公司,庆典公司,演出公司,演艺公司,年会酒会,生日寿宴,动工仪式,开工仪式,奠基典礼,商务会议,竣工落成,乔迁揭牌,签约启动-东莞市开门红文化传媒有限公司 | 广西教师资格网-广西教师资格证考试网| 武汉创亿电气设备有限公司_电力检测设备生产厂家 | 大连海岛旅游网>>大连旅游,大连海岛游,旅游景点攻略,海岛旅游官网 | 海尔生物医疗四川代理商,海尔低温冰箱四川销售-成都壹科医疗器械有限公司 | 电磁辐射仪-电磁辐射检测仪-pm2.5检测仪-多功能射线检测仪-上海何亦仪器仪表有限公司 | 伸缩器_伸缩接头_传力接头-巩义市润达管道设备制造有限公司 | 【灵硕展览集团】展台展会设计_展览会展台搭建_展览展示设计一站式服务公司 | 3D全息投影_地面互动投影_360度立体投影_水幕灯光秀 | 广东银虎 蜂窝块状沸石分子筛-吸附脱硫分子筛-萍乡市捷龙环保科技有限公司 | 磁粉制动器|张力控制器|气胀轴|伺服纠偏控制器整套厂家--台灵机电官网 | 土壤养分检测仪|土壤水分|土壤紧实度测定仪|土壤墒情监测系统-土壤仪器网 | 山东成考网-山东成人高考网 | 世纪豪门官网 世纪豪门集成吊顶加盟电话 世纪豪门售后电话 | 冷轧机|两肋冷轧机|扁钢冷轧机|倒立式拉丝机|钢筋拔丝机|收线机-巩义市华瑞重工机械制造有限公司 | 英国雷迪地下管线探测仪-雷迪RD8100管线仪-多功能数字听漏仪-北京迪瑞进创科技有限公司 | 冷油器,取样冷却器,热力除氧器-连云港振辉机械设备有限公司 | elisa试剂盒价格-酶联免疫试剂盒-猪elisa试剂盒-上海恒远生物科技有限公司 | 耐磨陶瓷管道_除渣器厂家-淄博浩瀚陶瓷科技有限公司 | 拉伸膜,PE缠绕膜,打包带,封箱胶带,包装膜厂家-东莞宏展包装 | 电竞学校_电子竞技培训学校学院-梦竞未来电竞学校官网 | 塑料脸盆批发,塑料盆生产厂家,临沂塑料广告盆,临沂家用塑料盆-临沂市永顺塑业 | 北京森语科技有限公司-模型制作专家-展览展示-沙盘模型设计制作-多媒体模型软硬件开发-三维地理信息交互沙盘 | 上海防爆真空干燥箱-上海防爆冷库-上海防爆冷柜?-上海浦下防爆设备厂家? | 安全阀_弹簧式安全阀_美标安全阀_工业冷冻安全阀厂家-中国·阿司米阀门有限公司 | 百度关键词优化_网站优化_SEO价格 - 云无限好排名 | 超声波反应釜【百科】-以马内利仪器 | 空气能采暖,热泵烘干机,空气源热水机组|设备|厂家,东莞高温热泵_正旭新能源 | 郑州宣传片拍摄-TVC广告片拍摄-微电影短视频制作-河南优柿文化传媒有限公司 | 双菱电缆-广州电缆厂_广州电缆厂有限公司| 在线浊度仪_悬浮物污泥浓度计_超声波泥位计_污泥界面仪_泥水界面仪-无锡蓝拓仪表科技有限公司 | 丹佛斯压力传感器,WISE温度传感器,WISE压力开关,丹佛斯温度开关-上海力笙工业设备有限公司 | 新密高铝耐火砖,轻质保温砖价格,浇注料厂家直销-郑州荣盛窑炉耐火材料有限公司 | 欧必特空气能-商用空气能热水工程,空气能热水器,超低温空气源热泵生产厂家-湖南欧必特空气能公司 | 婚博会2024时间表_婚博会门票领取_婚博会地址-婚博会官网 | 书信之家_书信标准模板范文大全| 冷库安装厂家_杭州冷库_保鲜库建设-浙江克冷制冷设备有限公司 | 工业胀紧套_万向节联轴器_链条-规格齐全-型号选购-非标订做-厂家批发价格-上海乙谛精密机械有限公司 | 无尘烘箱_洁净烤箱_真空无氧烤箱_半导体烤箱_电子防潮柜-深圳市怡和兴机电 | 医学动画公司-制作3d医学动画视频-医疗医学演示动画制作-医学三维动画制作公司 |