Install Java and Android Studio
- Download Java SE Development Kit 7u45 Installer for your operating system
- Download Android Studio and SDK bundle for Windows or the one for Mac (supported versions can be found at https://support.ssbbartgroup.com/hc/en-us/articles/213435743-About-AMP-for-Mobile)
- Now run the Java SE Development Kit 7u45 Installer and accept all the default values the installer offers
- Next run the Android Studio installer and accept all the default values the installer offers
- To ensure that all the functionality in the JDK and the Android SDK are available to AMP for Mobile Testing we need to make some "system updates"
- On Windows the "Path" Environment Variable needs to be modified <
- Got to the System screen of the Control Panel (Control Panel\System and Security\System)
- In the left nav of the ensuing dialog choose: "Advanced system settings"
- In the resulting "System Properties" dialog activate the "Environment Variables..." button
- In the "System variables" chooser of the scroll down, select the "Path" variable, and press "Edit"
- Copy the "Variable value" into your favorite editor
- Add the following to the end of the value making sure to substitute YOUR_USER_NAME with the name you use to login to Windows and BUILD_TOOLS_VERSION should be the latest version installed on your computer
- On 64-bit Linux, you may need to install the libstdc++-4.4.7-4.e16.i686 and zlib- 1.2.3-29.el6.i686 packages and add a symbolic link (libGL.so) to the Android SDK tool. In the following is the absolute path the the libGL installation adn is the absolute path of the Android SDK installation
ln -s <PATH_TO_libGL> <PATH_TO_ANDROID_SDK>/tools/lib/libGL.so
- Now just close out of Android Studio once the Installation is complete
- Occasionally on Windows machines that had a previous version of Android Studio installed the following Error is shown in the console of the installer. When the error is shown the installation will continue but at the end it will say: Failed to install: android-23 and offered a Retry button. If this occurs:
- Deleted the folder: C:\Users\[YOUR_USER_NAME]\AppData\Local\Android\sdk\platforms\android-23
- Activated the Retry button and the installation finished successfully
- DO NOT CANCEL if you see this error. Once the installation is complete you will be prompted to "Retry". Activate "Retry" and the installation will complete successfully.
Install the Android OS Accessibility Test Enabler Bundle
- Log into your AMP instance
- ex. https://[ACME].ssbbartgroup.com
- Activate the Toolbox tab
- Scroll down to the AMP for Android OS section
- Select the Android OS Accessibility Test Enabler Bundle - Android Studio to start the download
- Once the zip file has been downloaded open Android Studio and on Windows select File -> Settings -> Plugins. On a Mac select Android Studio -> Preferences -> Plugins
- Select the "Install plugin from disk..." button
- Navigate to the location where Android OS Accessibility Test Enabler Bundle was downloaded to and select it
- That's it! You are ready to run Accessibility Testing from Android Studio
Install the SSB Sample App
- Download the SSB Android Studio Sample App at the bottom of this page.
- Extract the SSBAndroidStudioExampleApp.zip
- Start Android Studio and from the Welcome to Android Studio window choose "Open an existing Android Studio project"
- In the Chooser window that opens navigate to where you extracted the SSBAndroidStudioExampleApp.zip and choose the SSBAndroidStudioExampleApp folder
- In the AS toolbar activate Run -> Run Android Accessibility Test
- Choose the 'app' module in the Choose Module for Accessibility Test dialog
- You may see a "No Devices Running" dialog that tells you that there are no compatible devices or emulators. Do not be alarmed and select "OK"
- This just means for some reason your Android Studio needs you to launch an emulator in advance of running the Accessibility Test. To do this follow these steps:
- From the AS toolbar activate Tools -> Android -> AVD Manager
- A "Your Virtual Devices" window will open
- Launch a Virtual Device by pressing the green arrow in the Actions column
- You will see a "Starting AVD" dialog appear with a progress bar
- Then you should see a window that has an Android emulators in it
- Be patient and wait for the white word "android" to disappear and the home screen to open.
- Congratulations! You have launched the emulator that Android Studio needs to be running to perform Accessibility Tests
- Once you have the emulator running n the AS toolbar activate Run -> Run Android Accessibility Test and choose the 'app' module as described above
- You will see the Accessibility Test Enablement pop up with a progress bar. This will run for a minute or two while success alert appear to the right letting you know things are working.
- Then a "Choose Device" dialog will appear
- Select the device/emulator that you just launched and select "OK"
- The Sample App is being installed and launched on your emulator
- When you see the table of contents in the sample app a module has already been sent to AMP instance you installed your bundle from
What Could Go Wrong?
Sometimes the configuration of the JDK, the SDK and the Mobile Test Enabler just aren't quite right. Some of the configuration issues that have come up are:
El Capitan - You are unable to create the symlinks
The 'El Capitan' version of Mac OS uses a System Integrity Protection feature. If you don't have 'write' privileges in the directories where the symlinks are created, you can resolve the issue by following the steps found in the 'Turning Off Rootless System Integrity Protection in OS X El Capitan 10.11 +' section here:
Once this is carried out, you can re-enable the system integration protection by following the same steps to navigate to 'Utilities'>'Terminal' when rebooting and type the following in the terminal:
csrutil enable; reboot
This will re-enable the protection, you no longer needing it disabled because the symlinks have been created.
The Android SDK build-tools zipalign command is not found.
This error looks like:
If you are on a Mac this means that <PATH_TO_ANDROID_SDK>/build-tools/<VERSION>/zipalign symlink that was created in /usr/bin/ is not pointing to a file. Check the full path <PATH_TO_ANDROID_SDK>/build-tools/<VERSION>/zipalign and make any necessary corrections to ensure you are symlinking to the zipalign file.
If you are on Windows then this means when you set the following value:
on your Path environment variable in the "Install Java and Android Studio" section of this doc that it is not pointing to a valid build tools version. This sometimes happen if you have reinstalled the Android Studio or SDK. When you reinstall Windows adds the new SDK at
Notice the numeral 1 at the end of sdk. There are now multiple sdk folders in the AppData\Local\Android folder. Navigate to that folder to verify. If you navigate into the sdk1 folder you should see that zipalign is in there. You will have to update the values on your Path environment variable to point to sdk1 or whichever folder in AppData\Local\Android that has the build-tools folder. For example if you have an idk folder that has no build tools and an sdk1 folder that does the Path should be updated to include:
The Java JDK jarsigner command is not found.
This error looks like:
This has only come up on windows and has to do with the value on the Path environment variable that points to the JDK's bin folder:
Ensure that there are no spaces between the previous or next value. This is incorrect:
C\Some Folder\AnotherFolder; C:\Program Files\Java\jdk[YOUR_JAVA_VERSION_NUMBER]\bin;
This is correct:
C\Some Folder\AnotherFolder;C:\Program Files\Java\jdk[YOUR_JAVA_VERSION_NUMBER]\bin;
Notice that there is NO space between the ; and the C:\ in the correct version!
Intel VT-x is Not Enabled
You could run into the error "Cannot launch AVD in emulator.
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!"
This means that you need to do one or both of:
a. Download Intel HAXM
b. Enable Intel VT-x on your Computer
Below are instructions for Installing Intel HAXM on Windows:
- Go to http://software.intel.com/en-us/android.
- Choose the Intel HAXM installer package for your platform.
- Extract the installer and follow installation instructions for your platform.
Downloading through Android* SDK Manager
- Start the Android* SDK Manager.
- Under Extras, check the box next to "Intel x86 Emulator Accelerator (HAXM)."
- Select the "Install package…" button.
- Review the Intel Corporation license agreement. If you accept the terms, select Accept and select 'Install'.
- The SDK Manager will download the installer to the "extras" directory, under the main SDK directory. Even though the SDK manager says "Installed" it actually means that the Intel HAXM executable was downloaded. You will still need to run the installer from the "extras" directory to get it installed.
- Run the installer inside the <sdk folder>/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/ directory and follow the installation instructions for your platform.
Instructions for Enabling Intel VT-x on Windows can be found here:
Power on the machine and open the BIOS (as per Step 1).
Open the Processor submenu The processor settings menu may be hidden in the Chipset, Advanced CPU Configuration or Northbridge.
Enable Intel Virtualization Technology (also known as Intel VT) or AMD-V depending on the brand of the processor. The virtualization extensions may be labeled Virtualization Extensions, Vanderpool or various other names depending on the OEM and system BIOS.
Enable Intel VTd or AMD IOMMU, if the options are available.
Select 'Save & Exit'.