0

So I added FCM and it works but if I want to run the command flutter buil apk --release I get the foolowing error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseGoogleServices'.
> com.google.gson.stream.MalformedJsonException: Expected ':' at line 11 column 10 path $.client[0].client_info.<<<<<<<

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 11s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      12.1s
Gradle task assembleRelease failed with exit code 1

I found this SO question but if I delete the line with apply plugin: 'com.google.gms.google-services' the push notifications doesn't work anymore

2 Answers2

4

The problem is in your google-services.json file. Did you edit it manually by chance? You can try downloading the file again from Firebase or try to find the missing ':'. It should be near the top of the file (line 10-11). Find the "client" key, then the first "client_info" key.

Lee3
  • 2,882
  • 1
  • 11
  • 19
1

check your google-services.json file anything will be wrong.

AK IJ
  • 492
  • 4
  • 10