问题
Google have changed the docs for generating registration ID and GCM in general. As always the docs are incomplete and include non functional code, one of which is adding configuration file to project. I am stuck at this step.
$ move path-to-download/google-services.json app/ is invalid windows command. Can someone correct this syntax for me please?
回答1:
Ok, I figured it out. Here is the correct answer. First don't copy and paste the line(sounds like that 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 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\"
回答2:
Solution:
Go to the Terminal in Android Studio (View->Tool Windows->Terminal)
move "path-to-download\google-services.json" app\
回答3:
- Open android studio terminal
- Go to app/ folder
- type "move path-for-downloads/google-services.json"
- Hit enter. Now you can see google-services.json file in your app folder of your project.
回答4:
- Open Terminal window in Android Studio (
Alt+F12
or View->Tool Windows->Terminal). - Then type "move file_path/google-services.json app/" without double quotes.
eg
move C:\Users\siva\Downloads\google-services.json app/
In LINUX Open Android Studio Terminal and type this
eg:
scp '/home/developer/Desktop/google-services.json' 'app/'
来源:https://stackoverflow.com/questions/31305605/how-to-add-configuration-file-to-android-studio-in-windows