1. 程式人生 > >Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

錯誤資訊:

......

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'io.ionic.starter'

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

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
:app:processDebugGoogleServices
Parsing json file: D:\project\eyeshot\eyeshot\app\platforms\android\app\google-services.json
:app:processDebugGoogleServices FAILED
26 actionable tasks: 2 executed, 24 up-to-date
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'io.ionic.starter'

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

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
[ERROR] An error occurred while running subprocess cordova.

        cordova run android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

解決辦法:

將檔案app\config.xml中的id="io.ionic.starter"和app\google-services.json中的"package_name": "io.ionic.starter"路徑修改為一樣的。

參考:

https://stackoverflow.com/questions/34679411/android-studio-gradle-errorexecution-failed-for-task-appprocessdebuggoogles