WynDiesel
WynDiesel

Reputation: 1214

Unable to parse google-services.json

I'm trying my hand at creating a push notification app in ionic. I've been followinthisg tutorial.

When I do a

ionic cordova run android

I receive an error message :

  • 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. Run with --scan to get full insights.

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

BUILD FAILED in 1s

Task :app:writeDebugApplicationId UP-TO-DATE

Task :app:processDebugGoogleServices FAILED Parsing json file: C:\Users\xxx\source\repos\ionic4-push\platforms\android\app\google-services.json 26 actionable tasks: 1 executed, 25 up-to-date

Everything points to the google-services.json file not being there, or being corrupted. The file is indeed at that location, and I've redownloaded the file and replaced it.

I've gone one step further, and attempted to run the command (what I assume) ionic is running, in cmd :

"C:\Program Files\Java\jdk1.8.0_241/bin/java.exe" "-Xmx64m" "-Dorg.gradle.appname=gradlew" -classpath "C:\Users\xxx\source\repos\ionic4-push\platforms\android\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain "cdvBuildDebug" "-b" "C:\Users\xxx\source\repos\ionic4-push\platforms\android\build.gradle"

Can anyone point me in the direction of the cause of this problem?

Upvotes: 0

Views: 2091

Answers (1)

Nehal Godhasara
Nehal Godhasara

Reputation: 795

Have you added app to firebase with io.ionic.starter this package name? and check your google-services.json file, it should contain information related to your package name. This kind of error occurs when your google-services.json file not contain your app information.

Hope it will helps!!

Upvotes: 2

Related Questions