有什么办法可以解决这个问题:Expected name at line 45 column 7 path $.client[0].services

Is there any way to fix this: Expected name at line 45 column 7 path $.client[0].services

尝试在 android studio 上构建时收到此错误代码。

Expected name at line 45 column 7 path $.client[0].services

哪里出错了。请协助

下面附上我的 google-services.json 文件。如果这可能有帮助

 {
   "project_info": {
     ...
   },
   "client": [
     {
         "client_info": {
           ...
         },
         "oauth_client": [
           ...
         ],
         "api_key": [
           ...
         ],
         "services": {
           ...
         },
       {                      
         "client_info": {
           ...
         },

正如错误信息所说,错误在第 45 行第 7 列

 1: {
 2:   "project_info": {
...     ...
 7:   },
 8:   "client": [
 9:     {
10:         "client_info": {
...           ...
15:         },
16:         "oauth_client": [
...           ...
29:         ],
30:         "api_key": [
...           ...
34:         ],
35:         "services": {
...           ...
44:         },
45:       {                      <== error is here
46:         "client_info": {
...           ...
51:         },

缩进有点不一致,但由于第 46 行看起来像是第 10 行的第二个实例,我认为问题在于 services 属性 应该是最后一个 [= client 对象的 22=],因此 , 本身应该是一个 },

35:         "services": {
...           ...
44:         }
new       },
45:       {
46:         "client_info": {

这结束了第 9 行开始的对象,然后第 45 行开始了第 8 行开始的数组的第二个对象。