5

Google has changed the documentation for generating registration ID and GCM in general. As always, the documentation is incomplete and include non-functional code, one of which is adding a configuration file to the project. I am stuck at this step:

move path-to-download/google-services.json app/

As it is an invalid Windows command. What is the correct syntax for this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
The_Martian
  • 3,684
  • 5
  • 33
  • 61

4 Answers4

20

First, don't copy and paste the line (it sounds like that the first time you read it). Then for Windows you don't need the dollar sign and use backslashes, not forward slashes.

Do not forget to write the path name in quotes. Else it will give "The syntax of the command is incorrect." exception.

 move "C:\yourdownload folder here\google-services.json" "app\"
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
The_Martian
  • 3,684
  • 5
  • 33
  • 61
3

Solution:

Go to the Terminal in Android Studio (menu ViewTool WindowsTerminal) and issue:

move "path-to-download\google-services.json" app\
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
2
  1. Open the Android Studio terminal
  2. Go to the app/ folder
  3. Type "move path-for-downloads/google-services.json"
  4. Hit Enter.

Now you can see the google-services.json file in your app folder of your project.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Anand
  • 857
  • 1
  • 12
  • 18
0
  • Open the Terminal window in Android Studio (Alt + F12 or menu ViewToolWindowsTerminal).
  • Then type "move file_path/google-services.json app/" without double quotes.

Example

move C:\Users\siva\Downloads\google-services.json app/

On Linux

Open Android Studio Terminal and type this:

Example:

scp '/home/developer/Desktop/google-services.json' 'app/'
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sivaBE35
  • 1,876
  • 18
  • 23