diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py index 2276961e6f..7f7593cf50 100644 --- a/pythonforandroid/build.py +++ b/pythonforandroid/build.py @@ -73,7 +73,10 @@ def get_toolchain_versions(ndk_dir, arch): def get_targets(sdk_dir): - if exists(join(sdk_dir, 'tools', 'bin', 'avdmanager')): + if 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') elif exists(join(sdk_dir, 'tools', 'android')):