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 Jun 29, 2023
1 parent 7d64ee9 commit f517289
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pythonforandroid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit f517289

Please sign in to comment.