bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
567 stars 773 forks source link

Android Studio not found by tests build #361

Closed jacobg closed 2 years ago

jacobg commented 2 years ago

The tests package.json looks for Android Studio at the installation path used when installed on its own: https://github.com/bitpay/cordova-plugin-qrscanner/blob/b62efb64801ba0b830f0aac556935c0978d2fb98/tests/project/package.json#L10

    "test:android": "cordova build android && open -a /Applications/Android\\ Studio.app platforms/android"

However, when Android Studio is installed via JetBrains Toolbox, it's at a different path, such as: ~/Library/Application\ Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/Android\ Studio.app

In such a case, this project as it's configured now will fail to build Android, as shown in npm-debug.log:

23 error Failed at the cordova-plugin-qrscanner-tests@ test:android script 'cordova build android && open -a /Applications/Android\ Studio.app platforms/android'.
jacobg commented 2 years ago

Since JetBrains Toolbox doesn't have any special command line tools to look up the preferred version, the solution here is probably for the user to create an alias in the Applications directory.