Android Studio Gradle: Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

后端 未结 25 1325
清酒与你
清酒与你 2020-12-04 11:53

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.examplea

相关标签:
25条回答
  • 2020-12-04 12:26

    This happened to me when my package name wasn't represented in the google-services.json file I downloaded. Open your google-services.json file and make sure there is a client_info object that has a package name that corresponds to your manifests package name.

    In googleservices.json:

    "client": [
      {
        "client_info": {
        "mobilesdk_app_id": "my-app-id",
        "android_client_info": {
          "package_name": "com.me.android.test.myapp"
      }
    

    and in your manifest:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.me.android.test.myapp" >
    

    You may need to recreate a new google-services.json for your project, which you can create here: https://developers.google.com/mobile/add?platform=android&cntapi=gcm

    0 讨论(0)
  • 2020-12-04 12:27

    Open google-services.json in android studio we can see a json object, and contain following items in 'client' jsonarray

    "client_id": "android:your package name", "package_name": "your package name",

    Please verify your package and proceed.

    0 讨论(0)
  • 2020-12-04 12:27

    Just Android studio run 'Run as administrator' it will work

    Or verify your package name on google-services.json file

    0 讨论(0)
  • 2020-12-04 12:27

    1)check the package name is the same in google-services.json file

    2)make sure that no other project exist with same package name

    3)make sure that there is internet access

    4)try syncing project and running it again

    0 讨论(0)
  • 2020-12-04 12:28

    after studying above that package name in manifest file and application id in gradle build file should be same. my issue didn't resolved.

    Actually your application id in gradle build file should be same as your package name in google-services.json file. if your google-services.json file has different package name. delete that app from google analytics or firebase console. and get a new file.

    0 讨论(0)
  • 2020-12-04 12:33

    For fixing:

    No matching client found for package name 'com.example.exampleapp:

    You should get a valid google-service.json file for your package from here

    For fixing:

    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.:

    You should move apply plugin: 'com.google.gms.google-services' to the end of your app gradle.build file. Something like this:

    dependencies {
        ...
    }
    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
提交回复
热议问题