How to add configuration file to android studio in windows?

∥☆過路亽.° 提交于 2019-12-07 04:08:22

问题


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:


  1. Open android studio terminal
  2. Go to app/ folder
  3. type "move path-for-downloads/google-services.json"
  4. 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

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