打开终端
(Terminal),输入下方命令,之后不再赘述。
$ chsh -s /bin/bash
$ echo $SHELL
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
后续使用推荐换源,参考操作: Homebrew仓库URL源替换方法
若习惯图形化界面可安装Cakebrew:brew install cakebrew
$ brew -v
$ brew update
$ brew install python@3.6
$ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
此处安装Python3.6的目的是为了安装pip3.6,便于之后使用。
多版本Python管理参考:Mac安装指定Python版本和指定库版本并且随意切换版本
$ python3 -V && java -version
强烈建议避免安装15版本。
$ brew install node@14
$ npm install cnpm -g --registry=https://registry.npm.taobao.org
$ node -v && npm -v
自行选择,自行安装。
$ xcode-select --install
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer #可选项,指定Xcode版本,用于Mac上安装了多个Xcode的情况
$ echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.bash_profile
$ source ~/.bash_profile
$ echo $JAVA_HOME
$ echo 'export USER_HOME=$(eval echo ~$user)' >> ~/.bash_profile
$ echo 'export ANDROID_HOME=$USER_HOME/Library/Android/sdk' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/platform-tools:$PATH' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/platform-tools/bin:$PATH' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/tools:$PATH' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/tools/bin:$PATH' >> ~/.bash_profile
$ echo 'export BUILDTOOLS_VERSION=$(eval echo `ls $ANDROID_HOME/build-tools`)' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/build-tools/$BUILDTOOLS_VERSION:$PATH' >> ~/.bash_profile
$ echo 'export PATH=$ANDROID_HOME/build-tools/$BUILDTOOLS_VERSION/bin:$PATH' >> ~/.bash_profile
$ source ~/.bash_profile
$ echo $ANDROID_HOME
此处省略检验步骤,有需要可自行检查软件或模块的安装情况。
$ sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
$ sudo xcodebuild -license accept
$ brew install carthage libimobiledevice ios-deploy cmake wix/brew/applesimutils ios-webkit-debug-proxy gstreamer ifuse lyft/formulae/set-simulator-location
$ brew install --cask osxfuse
$ brew tap facebook/fb
$ brew install idb-companion
$ pip3.6 install fb-idb
$ echo 'export OPENCV4NODEJS_DISABLE_AUTOBUILD=1' >> ~/.bash_profile
$ npm install -g appium wd appium-doctor webpack opencv4nodejs mjpeg-consumer ffmpeg
下载并配置Bundletool
bundletool.jar
:https://github.com/google/bundletool/releases
bundletool.jar
(注意“.jar”为后缀名)$ mkdir ~/Library/Android/sdk/bundle-tool
bundletool.jar
文件复制到上方的地址
访达
中使用快捷键Command+Shift+G
~/Library/Android/sdk/bundle-tool
后按回车键$ chmod +x bundletool.jar
$ echo 'export PATH=$ANDROID_HOME/bundle-tool:$PATH' >> ~/.bash_profile
$ source ~/.bash_profile
$ appium-doctor
通过appium-doctor
可以确认所需软件、模块是否成功安装,以便作出针对性处理。
若一切顺利,则系统检测通过,并反馈Everything looks good, bye!
$ appium
[1]Krishna Chetan.Setup Appium on Mac OS for Android and iOS App Automation [EB/OL].https://krishnachetan.medium.com/setup-appium-on-mac-1e06f1178427, 2020-10-21/2021-4-7
[2]cuma2369.bash 获取环境变量_如何从Bash中的变量中的用户名获取用户的主目录? [EB/OL].https://blog.csdn.net/cuma2369/article/details/107668958, 2020-07-21/2021-4-7
修改和添加关于数据库的信息,可以用于任何的添加和修改这些数据库和前面的随笔...
了解如何使用 ps、kill 和 killall 命令来终止进程并回收系统资源。 在 Linux 中...
html即超文本标记语言,现在大多网页都是html的格式。而所谓的html文件,其实就...
以下讨论的机子有 一个要攻击的机子:10.5.4.178 硬件地址:52:54:4C:98:EE:2F ...
事件背景 有一个公用页面需要在多个页面调用,其中涉及到部分js已经写在了公用页...
Evernote 是一款流行的笔记应用。它在推出时是一个革命性的产品。从那时起,已经...
1.停止IIS; 2.在运行中输入反注册命令 regsvr32 /u vbscript.dll,提示成功后进...
尽管Windows Subsystem for Linux(WSL)是与windows10一起运行Linux发行版的一种...
小皮面板是什么? 小皮面板,是由phpStudy官方团队针对Linux服务器开发推出的一...
前言 在云领域我们经常会听到一个词:多租户。这个词在不同的语境中有着不同的含...