Skip to content

Commit a65caa2

Browse files
committed
in build.py avdmanager replacing deprecated android tool
1 parent c61a413 commit a65caa2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pythonforandroid/build.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
228228
error('You probably want to build with --arch=armeabi-v7a instead')
229229
exit(1)
230230

231-
android = sh.Command(join(sdk_dir, 'tools', 'android'))
232-
targets = android('list').stdout.decode('utf-8').split('\n')
231+
# android = sh.Command(join(sdk_dir, 'tools', 'android'))
232+
# android command was deprecated and removed in Android SDK Tools Revision 25.3.0 (Feb 2017)
233+
avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager'))
234+
# targets = android('list').stdout.decode('utf-8').split('\n')
235+
targets = avdmanager('list').stdout.decode('utf-8').split('\n')
233236
apis = [s for s in targets if re.match(r'^ *API level: ', s)]
234237
apis = [re.findall(r'[0-9]+', s) for s in apis]
235238
apis = [int(s[0]) for s in apis if s]

0 commit comments

Comments
 (0)