开发环境配置
2019-07-24 本文已影响0人
魏树鑫
前言
每次换电脑都要查一遍环境配置教程,本文旨在记录常用开发环境配置;
环境配置文件
1.打开terminal终端。
2.进入当前用户的home目录。
3.创建.bash_profile文件:touch .bash_profile
4.打开.bash_profile文件:open -e .bash_profile
5.保存刷新环境: source ~/.bash_profile
Android SDK和ADB
export ANDROID_HOME=xxxx/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
JDK
JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH:
export JAVA_HOME
export CLASSPATH
export PATH
MySQL 环境
PATH=$PATH:/usr/local/mysql/bin
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
Gradle 环境
GRADLE_HOME=/Applications/Android\ Studio.app/Contents/gradle/gradle-4.1
export GRADLE_HOME
export PATH=${PATH}:${GRADLE_HOME}/bin
Flutter 环境
export PATH=xxx/flutter/bin:$PATH