0
votes

I use google map api and get json file like this : https://maps.googleapis.com/maps/api/directions/json?origin=35.693391,51.424261&destination=35.692032,51.432715&waypoints=35.691997,51.432758&key=AIzaSyB2cyH7mXydKt07kdjDswy7nyv4QWBs-VQ

when you copy it in browser will see correct json file but in my app I facing this error : 1) GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.

to soldving that , I singned in google developer and copy generated json file in app folder but didnt work

2)com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1

1

1 Answers

0
votes

Please open your google-services.json file and write open braces { instead of " in line 1 column 1 means first character of line one.