Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AndroidHelper: Fix Android -emulator flag by preferring newer executa…
…ble paths from Android SDK The 'SDK Tools' package located in /tools/ is officially considered 'obsolete', so we should not use it by default. We now prefer /platform-tools/adb over /tools/adb We now prefer /emulator/emulator over /tools/emulator If the newer replacement executables are missing, we still try to fall back to /tools/. This should allow older Android SDKs to continue to work properly. Additionally, if neither version can be found, we report an error. For adb, we always need it, so we always report an error if it is missing. For emulator, we report an error only if we're actually going to use an emulator. /tools/android doesn't have a newer alternative. We were running 'android list avds' to get a list of all available AVDs. However, both '/emulator/emulator -list-avds' and '/tools/emulator -list-avds' provide a simple list of AVDs separated by line breaks. So it seems that we never actually needed /tools/android. Plus, it outputs a better format that doesn't require searching every line of the output string for 'Name:', and we can just split and trim. So I completely removed /tools/android and we now use either '/emulator/emulator -list-avds' or '/tools/emulator -list-avds'.
- Loading branch information