question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[win10] Appium cannot find bundletool.jar in the PATH with node-which and where command

See original GitHub issue

The problem

appium-doctor 1.9.0 cant find my local bundletool-all-0.8.0.jar

Environment

windows 10 os version 17763.348 appium 1.11.1 appium-doctor 1.9.0 nodejs 10.15.1 npm 6.4.1 android sdk image

Details

The hard one was the bundletool.jar - here are the steps I followed for that:

Searched for ‘bundletool.jar’ and found a place to download it from Google - I got ‘bundletool-all-0.8.0.jar’ from https://github.com/google/bundletool/releases

I renamed this file to just ‘bundletool.jar’ and placed in my Android SDK folder, under its own sub-folder called ‘bundle-tools’ - full path: D:\Android\android-sdk\bundle-tools\

image

Added the ‘bundle-tools’ folder to Path with the following addition in my PATH image

Now running which ‘bundletool.jar’ is happy and finds it in the ‘bundle-tools’ folder I created (see step 2)

Running ‘appium-doctor’ is now satisfied - and doesn’t report any missing dependencies

Link to Appium logs

C:\Users\cmd>appium-doctor info AppiumDoctor Appium Doctor v.1.9.0 info AppiumDoctor ### Diagnostic for necessary dependencies starting ### info AppiumDoctor ✔ The Node.js binary was found at: D:\nodejs\node.EXE info AppiumDoctor ✔ Node version is 10.15.1 info AppiumDoctor ✔ ANDROID_HOME is set to: D:\Android\android-sdk info AppiumDoctor ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_201 info AppiumDoctor ✔ adb exists at: D:\Android\android-sdk\platform-tools\adb.exe info AppiumDoctor ✔ android exists at: D:\Android\android-sdk\tools\android.bat info AppiumDoctor ✔ emulator exists at: D:\Android\android-sdk\tools\emulator.exe info AppiumDoctor ✔ Bin directory of %JAVA_HOME% is set info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ### info AppiumDoctor info AppiumDoctor ### Diagnostic for optional dependencies starting ### info AppiumDoctor ✔ Python required by node-gyp (used by heapdump) is installed at: D:\Python27\python.EXE. Installed version is: 2.7.14 WARN AppiumDoctor ✖ opencv4nodejs cannot be found. WARN AppiumDoctor ✖ ffmpeg cannot be found WARN AppiumDoctor ✖ bundletool.jar cannot be found info AppiumDoctor ### Diagnostic for optional dependencies completed, 3 fixes possible. ### info AppiumDoctor info AppiumDoctor ### Optional Manual Fixes ### info AppiumDoctor The configuration can install optionally. Please do the following manually: WARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md WARN AppiumDoctor ➜ ffmpeg is needed to record screen features. Please read https://www.ffmpeg.org/ to install it WARN AppiumDoctor ➜ bundletool.jar is used to handle Android App Bundle. Please read http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ to install it info AppiumDoctor info AppiumDoctor ### info AppiumDoctor info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have been applied! info AppiumDoctor

I can use bundletool like this

`D:\Android\android-sdk\bundle-tools>java -jar bundletool-all-0.8.0.jar --help Error: You have to specify a command. Synopsis: bundletool <command> …

Use ‘bundletool help <command>’ to learn more about the given command.

build-bundle command: Builds an Android App Bundle from a set of Bundle modules provided as zip files.

build-apks command: Generates an APK Set archive containing either all possible split APKs and standalone APKs or APKs optimized for the connected device (see connected- device flag).

extract-apks command: Extracts from an APK Set the APKs that should be installed on a given device.

get-device-spec command: Writes out a JSON file containing the device specifications (i.e. features and properties) of the connected Android device.

install-apks command: Installs APKs extracted from an APK Set to a connected device. Replaces already installed package.

validate command: Verifies the given Android App Bundle is valid and prints out information about it.

dump command: Prints files or extract values from the bundle in a human-readable form.

get-size command: Computes the min and max download sizes of APKs served to different devices configurations from an APK Set.

version command: Prints the version of BundleTool.

D:\Android\android-sdk\bundle-tools>bunletool help ‘bunletool’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。`

Code To Reproduce Issue [ Good To Have ]

Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.

Please git clone https://github.com/appium/appium and from the sample-code directory, use one of your favourite languages and sample apps to reproduce the issue.

In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:32 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
ishubhamjaincommented, Mar 16, 2019

Facing the exactly same issue.

3reactions
portlandercommented, Apr 12, 2019

@KazuCocoa I guess your operating system is mac

So you don’t have a system environment to verify this.

Appium is very easy to install and use under Mac and ubuntu.

But there are always many strange problems under Windows.

I recommend that testing be strengthened in three systems environments before release

After adding .JAR to PATHEXT , my appium-doctor can then report bundletool.jar installed. Also, node-which bundletool.jar can find it too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appium) Finishing setting up optional dependencies
When I run appium doctor, I'am getting two optional dependencies are missing. 1. `opencv4nodejs` 2. `bundletool.jar`. If I try to install ...
Read more >
Trouble getting the "getting started" example to work - Support
WARN AppiumDoctor ✖ bundletool.jar cannot be found info AppiumDoctor ### Diagnostic for optional dependencies completed, 3 fixes possible.
Read more >
Not able to find the appium.js file where it is located in local ...
Not able to find the appium.js file where it is located in local system, though installed Appium Desktop V1.7.2 in windows 10 os....
Read more >
Failed to install .apks (not apk) using Appium in C# on real ...
When I ran appium-doctor , it shows bundletool.jar is installed at:.<detailed path of bundle-tool,i.e. under Android/Sdk/ b…
Read more >
Appium is not working for android - Support
2020-01-09 17:08:48:588 [W3C] Encountered internal error running command: Error: Could not find 'adb' in PATH. Please set the ANDROID_HOME ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found