Mac computer configures Java environment and android environment, deletes automatic updates of Google Chrome

1. Configure the android environment

  • Open android studio,
  •  

  • # 进入到根目录
    cd ~
    # 可以使用open命令直接打开
    open ~/.bash_profile    或者open ~/.zshrc 
    
    #输入以下命令,注意替换自己的地址
    export ANDROID_HOME=/Users/inceotio/Library/Android/sdk
    export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    export PATH=${PATH}:${ANDROID_HOME}/tools
    export PATH=${PATH}:${ANDROID_HOME}/platform-tools
    export PATH=${PATH}:${ANDROID_HOME}/platform-tools/adb
    
    
  • Exit after saving and execute in terminal
  • source ~/.zshrc  或者source ~/.bash_profile 
    # 根据你自己保存的文件执行

2. Configure Java environment

  • You can select this in your IDEA to download, or you can go to the JDK official website to download and install it yourself.

  • After downloading, you can go to the terminal and execute the command. All jdk paths on this computer will be listed.
  • /usr/libexec/java_home -V
  •  Choose the path you need
  • # 进入到根目录
    cd ~
    # 可以使用open命令直接打开
    open ~/.bash_profile    或者open ~/.zshrc 
    
    #输入以下命令,注意替换自己的地址
    
    export JAVA_HOME=/Users/inceotio/Library/Java/JavaVirtualMachines/azul-15.0.8/Contents/Home
    
    export PATH=$JAVA_HOME/bin:$PATH
    export CLASS_PATH=$JAVA_HOME/lib
    

3. Turn off automatic updates of Google Chrome

Type in Google Chrome:

'''chrome://version to view the specific configuration file path.

On mac: First close the Chrome browser, delete from the command line, or enter the directory "/Library/Google/GoogleSoftwareUpdate" with Finder

Just delete GoogleSoftwareUpdate.bundle.

Chromewebdriver download address: CNPM Binaries Mirror

Guess you like

Origin blog.csdn.net/lau_jw/article/details/126604920