Mac+appium+android+ios Environment Construction

Source: Internet
Author: User
Tags install node appium

Appium Environment set up, online indeed a lot of but are older version of the installation, at present I do is to use the command to download the latest installation, pre-installation preparation work, first you have a mac~ haha good not wordy into the topic;
System Environment Computer system version: 10.13.4;xcoke version 9.3.1; (only for a xcoke version of the computer)

Installing homebrew

It is highly recommended that all MacOS software be installed using homebrew, using brew-installed software and no more sudo commands.
Open terminal, run:
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

Use command: brew-v if output:
Homebrew 1.6.3
Homebrew/homebrew-core (git revision 3069d; last commit 2018-05-14)

Indicates a successful installation;

Check if Git has been installed
Output command git--version;
#git version 2.15.1 (Apple Git-101)
Indicates that the Execute brew install git command has not been installed

Java installation
Go to the/library/java/javavirtualmachines/directory to see if you have installed Java version 1.8 or more included;
Do it right there.
java-version See if the environment is configured
The output version number is configured without executing
VI ~/.bash_profile
Add to
Java_home=/library/java/javavirtualmachines/jdk-10.0.1.jdk/contents/home
Path= $JAVA _home/bin: $PATH:
Export Java_home
Export PATH
Java is not installed
Javahttp://www.oracle.com/technetwork/java/javase/downloads/index.html
Download the installation yourself and follow the Java installation

Installing Nodejs
Use the command: Brew Install node
After the installation is complete, enter the command: NODE-V
#v10.1.0
Npm-v
#5.6.0
Indicate success;
If you can xxx then install CNPM can ignore the CNPM command you directly use NPM
Since NPM source is abroad, we use NPM to install the library is slow, you can use the Taobao mirror source
NPM install-g cnpm--registry=https://registry.npm.taobao.org

Check if the installation was successful
Input command: cnpm-v
#5.3.0

Install Python

Brew Install Python3

Detect installation Success

Python3-v
#Python 3.6.2

Pip3-v
#pip 9.0.1 from/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages (Python 3.6)

Test Android app required.
: Https://developer.android.com/studio/index.html#downloads
We recommend selecting Android Studio to download and installing the SDK with studio. Just like installing other Mac OS programs.
After the installation is complete, open Android Studio and you may be prompted unable to access Android SDK add-on list. This means that we do not have the SDK installed on our computer, OK, click Cancel and install the SDK on the subsequent interface.
Install Android SDK Tools and Android SDK Platform-tools and go to the Preference--appearance&behavior--system settings--android SDK.

You can download and update the Android SDK Tools and Android SDK Platform-tools here. Keep the default options and if necessary, you can communicate with the company engineer to see the SDK version supported by the company project, click Install Packages

Accept License. Then the install will be OK in about 30 minutes.
Configuring the Android SDK environment variables
VI ~/.bash_profile
Add to
Export ANDROID_HOME=/USERS/WANGCHAO/LIBRARY/ANDROID/SDK
Export Path=${path}:/users/wangchao/library/android/sdk/platform-tools
Export Path=${path}:/users/wangchao/library/android/sdk/tools

command line input adb version
Android Debug Bridge Version 1.0.39
Version 0.0.1-4500957
Installed AS/USERS/WANGCHAO/LIBRARY/ANDROID/SDK/PLATFORM-TOOLS/ADB

Configuration succeeded

Installing Appium Server
In terminal input CNPM install-g appium
Installation process is slow after installation is complete
Installing Appium Client
CNPM Install WD
Install Appium doctor to detect successful installation of Appium
Perform NPM install appium-doctor-g at the terminal to mount the doctor.
When the installation is complete, the terminal input Appium-doctor detects if the environment is successful.
$ appium-doctor
Info appiumdoctor Appium Doctor v.1.4.3
Info Appiumdoctor # # Diagnostic Starting # # #
Info appiumdoctor? The node. JS binary was found at:/usr/local/bin/node
Info appiumdoctor? Node version is 10.1.0
Info appiumdoctor? Xcode is installed at:/applications/xcode.app/contents/developer
Info appiumdoctor? Xcode Command line Tools is installed.
Info appiumdoctor? Devtoolssecurity is enabled.
Info appiumdoctor? The Authorization DB is set up properly.
Info appiumdoctor? Carthage was found at:/usr/local/bin/carthage
Info appiumdoctor? HOME is set to:/users/wangchao
Info appiumdoctor? Android_home is set to:/USERS/WANGCHAO/LIBRARY/ANDROID/SDK
Info appiumdoctor? Java_home is set to:/library/java/javavirtualmachines/jdk-10.0.1.jdk/contents/home
Info appiumdoctor? ADB exists at:/users/wangchao/library/android/sdk/platform-tools/adb
Info appiumdoctor? Android exists at:/users/wangchao/library/android/sdk/tools/android
Info appiumdoctor? Emulator exists at:/users/wangchao/library/android/sdk/tools/emulator
Info appiumdoctor? Bin Directory of $JAVA _home is set
Info Appiumdoctor # # Diagnostic completed, no fix needed. ###
Info Appiumdoctor
Info appiumdoctor Everything looks good, bye!
Info Appiumdoctor
Indicates success

Installing Appium-desktop
Website Http://appium.io
I download version is Appium-1.6.1
Find Appium in PC application after installation click Open
See this page

Using the Android SDK to create the simulator; it is not self-Baidu; Use the real machine best;
Get device Name list: ADB devices
Get System version: ADB shell Getprop ro.build.version.release
Modify host add 127.0.0.1 localhost does not appear after server startup is not connected
Open Interface Modify server address to 127.0.0.1

Click Start Service v1.8.0
See that a start is successful

Click the button inside the red circle of the picture

Start if the picture configuration modifies Platformversion (System version number), DeviceName (device name), Apppackage (package name), Appactivity (startup page) according to its own situation, App (APK package in the computer's location) Click on the red Circle labeled button

Configuration succeeded

Mac+appium+android+ios Environment Construction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.