[win10] Appium cannot find bundletool.jar in the PATH with node-which and where command
See original GitHub issueThe 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
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\
Added the ‘bundle-tools’ folder to Path with the following addition in my PATH
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:
- Created 5 years ago
- Reactions:1
- Comments:32 (10 by maintainers)
Top GitHub Comments
Facing the exactly same issue.
After adding .JAR to PATHEXT , my appium-doctor can then report bundletool.jar installed. Also, node-which bundletool.jar can find it too.