Appium error: bundletool.jar cannot be found

I’ve installed Appium in Linux and MacOS and once I finished the installation I’ve ran appium-doctor to do a diagnostic for necessary dependencies. In both computers I got the same problem:

  • bundletool.jar cannot be found

I’ve tried a bunch of solutions proposed via Stack Overflow and similar sites, but I got no solutions. So investigating and doing different tests I was able to solve it using these steps:

  • Download bundletool.jar` from https://github.com/google/bundletool/releases
    • At this moment is bundletool-all-0.10.3.jar`
  • Rename it to bundletool.jar
  • Create folder ~/Library/Android/sdk/bundle-tool in Mac
    • ~/Android/Sdk/bundle-tool in Linux
  • Move bundletool.jar to this path and make it executable with chmod +x bundletool.jar
  • Add $ANDROID_HOME/bundle-tool to the path editing .bash_profile or .bashrc

Finally when you run appium-doctor you can see bundletool.jar is properly installed at found.

What is Appium and how to install it

As you can read in http://appium.io/ Appium is an open source test automation framework for use with native, hybrid and mobile web apps. It drives iOS, Android, and Windows apps using the WebDriver protocol. So if you are trying to automate tests for a mobile app, this is a tool you must check.

Appium allow us to interact with the app elements, and it can be used with different languages as Java, JavaScript, Ruby or Python. It is licensed under Apache 2 license, and joined de JS foundation in October 2016.

To install Appium Desktop (server side) you must download the corresponding binary from https://github.com/appium/appium-desktop/releases/ There is a .dmg for your Mac, a .exe for your Windows or a .AppImage for Linux. Take into account in Linux you must run chmod a+x to grant execution permissions, and run ./AppImage to execute it.

Next steps

If you are interested in automating Android apps, you have to install Android Studio, Android SDK (can be easily installed during Android Studio installation) and Java (remember to set JAVA_HOME).