Error Creating json project configuration file for Implementing GCM Client on Android

谁说我不能喝 提交于 2020-01-30 08:33:46

问题


I am trying to get gcm working in my app. It is my job to update the app from the Eclipse build to the Android studio build. In the Android Studio build it no longer works to just plug in gcm.jar, so I am following this documentation: https://developers.google.com/cloud-messaging/android/client to get my app running with gcm.

In order to do that I need to create a json configuration file. To make that file I must give google's configuration file creator my appId and my packageName.

I have entered them into google's form, and upon entry I get the error: "There was an unknown error while processing the request. Try again."

This error message is very vague.

I have attempted again in internet explorer with the same result.

Is there possibly an error with my appId and packageName? How would I find out? It is possible that this service is just down and I should wait until tomorrow, but I want to exhaust all my options first.

My appId and packageName are both "myCompanyName.android"


回答1:


Just found out a moment ago that creating a client ID for the app in developer console project removes this error and allows the config file to be created...

Developer console projects
APIs & auth
Credentials
Create new client ID:
  Installed application
  Android
  Enter package name
  Enter SHA1 for RELEASE OR DEBUG (which ever one you want it to work with)
  Make deep linking choice
  Create

Then went back to the page and it works. Could be other stuff in the console that you need to do but idk as I already have other stuff set up.




回答2:


Turns out the form just won't accept periods in the application name. I am unsure why periods are acceptable in the application name within my build then.

Anyway, I will leave this question up here in case someone else runs into this problem because the error message is soooooooo vague.




回答3:


I got the same issue while logging to google using multiple accounts.

Just login using single account and problem will be solved




回答4:


And for me the solution was as simple as:

  1. logout from Firebase
  2. log in to Firebase


来源:https://stackoverflow.com/questions/30604318/error-creating-json-project-configuration-file-for-implementing-gcm-client-on-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!