From 4267f066e6970b74bbffec63bdf54d3da130dcac Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 6 Oct 2022 15:05:43 +0000 Subject: [PATCH] android sdk tools: adapt path to file hierarchy changes 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: https://github.com/kivy/python-for-android/issues/2540 https://github.com/kivy/python-for-android/pull/2593 --- buildozer/targets/android.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 34364b5e8..c0b07f83c 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -244,7 +244,10 @@ def apache_ant_dir(self): @property def sdkmanager_path(self): sdkmanager_path = join( - self.android_sdk_dir, 'tools', 'bin', 'sdkmanager') + self.android_sdk_dir, 'cmdline-tools', 'bin', 'sdkmanager') + if not os.path.isfile(sdkmanager_path): + sdkmanager_path = join( + self.android_sdk_dir, 'tools', 'bin', 'sdkmanager') if not os.path.isfile(sdkmanager_path): raise BuildozerException( ('sdkmanager path "{}" does not exist, sdkmanager is not'