Mac Android Studio上传代码到github和cl
2018-02-06 本文已影响64人
蓝库知识
Mac系统下,在android studio中使用Github版本管理
由于Mac中自带Git,所以不需要下载
上传代码到github
步骤:
1.在Android studio中登录您的github账号
Android Studio--> Preferences
!!!填写完记得点击ok


2.将此项目push到github中
VCS-->Import into Version Control-->Share Project on GitHub
然后根据要求上传你的项目就好了
3.将修改的内容添加到github中
如果新加了一个类,则右键类,然后选择Git->add
如果一个类中有更改的部分,则右键类,然后选择Git->commit
!!!最后都要记得push,要不然更改的内容不能上传到github中。
push:右键类->Git->Repository->push
clone到Android studio
步骤:
1.VCS-->Checkout from Version Control-->GitHub
2.填写你的项目地址以及项目在本地存储到位置,点击ok完成
但是我clone下来后遇到了没有选择sdk的问题
解决方案:
在File-->Project Structure-->app 中选择Build Tools Version就好了

喵印~~