diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py index 5419063a8b..9ea2d63d4a 100644 --- a/pythonforandroid/build.py +++ b/pythonforandroid/build.py @@ -29,7 +29,9 @@ def get_targets(sdk_dir): if exists(join(sdk_dir, 'cmdline-tools', 'latest', 'bin', 'avdmanager')): avdmanager = sh.Command(join(sdk_dir, 'cmdline-tools', 'latest', 'bin', 'avdmanager')) targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n') - + elif exists(join(sdk_dir, 'cmdline-tools', 'bin', 'avdmanager')): + avdmanager = sh.Command(join(sdk_dir, 'cmdline-tools', 'bin', 'avdmanager')) + targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n') elif exists(join(sdk_dir, 'tools', 'bin', 'avdmanager')): avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager')) targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n')