# install Android simulator
# win Systems and mac system
# 1. adopt Android Studio Install the simulator
# to download Android Studio
- to download Android Studio.
- The current latest version is: android-studio-2021. 3. 1. 17 (2022-12-21). If the notepad is M1 Then download Mac with Apple chip, Instead Download Mac with Intel chipDevelopers need to download the appropriate version according to the actual situation of the system.
- Click Install, select when installing
Custom
Option, not selectedStandard
- Make sure the following items are selected:
Android SDK
、Android SDK Platform
、Android Virtual Device
# 2. Creating a simulator
# 3. Configure environment variables
After installation Need to configure the corresponding environment variables
- Before configuring the environment, you can turn on terminal input executable
echo $SHELL
Determine Local shell Version, which selects the corresponding environment variable way, such as the following bash or zsh
- Before configuring the environment, you can turn on terminal input executable
- implement
open -e/.bash_profile
, oropen -e /.zshrc
Open the corresponding configuration file (if you find that the file does not exist at the time of execution, you can use thetouch/.bash_profile
ortouch/.zshrc
Newly opened)
- implement
- Add to
ANDROID_HOME
And other relevant environment variables, such as the following (how to view Android SDK The installation path (i.e. ANDROID_HOME Of the path), you can view the[Frequently Asked Questions](../mac.md#% E5%9B%9B%E3%80%81%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98))
- Add to
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
- Execute orders
source/.bash_profile
orsource/.zshrc
Make the configuration effective
- Execute orders
- Verify that the configuration is successful, open the terminal, and enter
echo $ANDROID_HOME
, View Effect
- Verify that the configuration is successful, open the terminal, and enter
Note: Fixing environment variables requires restarting the Weixin DevTools project