记一次Android开发环境搭建

最近重装了一次win10系统,导致开发环境需要重新搭建

一· 安装JDK

  • 地址: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

现在下载JDK需要注册https://login.oracle.com/mysso/signon.jsp
的账户

  • 配置JAVA_HOME,CLASSPATH,Path


    记一次Android开发环境搭建_第1张图片
    JAVA_HOME
记一次Android开发环境搭建_第2张图片
CLASSPATH
Path

二·安装Git

  • 地址: https://git-scm.com/downloads
  • 配置 Git
$ git config --global user.name "xiaowugui"
$ git config --global user.email [email protected]

详细配置参考: https://git-scm.com/book/zh/v2/%E8%87%AA%E5%AE%9A%E4%B9%89-Git-%E9%85%8D%E7%BD%AE-Git

  • 配置Git-ssh,打开git Bash操作
  1. 生成密钥
    ssh-keygen -t rsa -C "[email protected]
  2. 添加密钥到ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

记一次Android开发环境搭建_第3张图片
git-ssh

3.登陆Github, 将.ssh/id_rsa.pub添加 ssh https://github.com/settings/keys
记一次Android开发环境搭建_第4张图片
github

4.测试,你将会看到
ssh -T [email protected]

Hi humingx! You’ve successfully authenticated, but GitHub does not provide shell access.

success
  • 如果报错,请删除rm -rf .ssh/known_hosts:
    connection reset

安装Android Studio

-地址: https://developer.android.com/studio

你可能感兴趣的:(记一次Android开发环境搭建)