Skip to content

Commit

Permalink
android sdk tools: adapt path to file hierarchy changes
Browse files Browse the repository at this point in the history
Recent Android SDK tools, including e.g. "8092744" and "8512546" [1][2],
use a different path structure than e.g. "6514223" [0].
E.g. `sdkmanager` in older sdk tools used to be located at
  ${ANDROID_SDK_HOME}/tools/bin/sdkmanager
but now it is at
  ${ANDROID_SDK_HOME}/cmdline-tools/bin/sdkmanager

[0]: https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip
[1]: https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip
[2]: https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip

Related:
kivy#2540
kivy#2593
  • Loading branch information
SomberNight authored and accumulator committed Jan 5, 2023
1 parent 10d51b3 commit d7a98b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pythonforandroid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')):
Expand Down

0 comments on commit d7a98b0

Please sign in to comment.