Tuesday, 7 November 2017

Appium - Install SDK tools and packages

In this post we will install android SDK tools and required packages to run test cases in android device.

Introduction:

SDK Manager

SDK manager which is a command line tool to view, install, update, and uninstall packages for the Android SDK .
The sdkmanager tool is provided in the Android SDK Tools package (25.2.3 and higher) and is located in android_sdk/tools/bin/. To install update and uninstall packages use below commands.

Install Packages
sdkmanager packages [options]
Update all Packages
sdkmanager --update [options]
Uninstall Packages
sdkmanager --uninstall packages [options]
Android SDK download
  1. Go to download section of official website of Android Studio, scroll down to the end of the page. Select the platform specific installer.
     
  2. Agree terms and condition to download the zip.
     
  3. Extract the zip to a specific location, you will see tools directory.
     
  4. Open command prompt and navigate to the android_sdk/tools/bin/ directory and run command
    sdkmanager "platform-tools" "platforms;android-26" "build-tools;27.0.1"
     
  5. Accept terms and condition and proceed.

  6.  On completion will see new packages in our sdk root directory.

Android Home and Path Setup

Set PATH variables for android_sdk/tools and android_sdk/platform-tools in environment variables.
That is,  go to Control Panel\System and Security\System> Advanced system settings > Environment variables
ANDROID_HOME: android_sdk directory

Path: %ANDROID_HOME%\platform-tools\;%ANDROID_HOME%\tools\

No comments:

Post a Comment