Merge pull request #754 from kivy/fix_download_ndk

this allows to build with ndk 17c (and other recent-ish ones)
This commit is contained in:
Gabriel Pettier 2018-11-26 15:48:49 +01:00 committed by GitHub
commit 6d447817aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -299,7 +299,9 @@ class TargetAndroid(Target):
is_64 = (os.uname()[4] == 'x86_64')
elif platform.startswith('linux'):
if int(_version) > 9: # if greater than 9, take it as .bin file
if int(_version) > 10:
archive = 'android-ndk-r{0}-linux-{1}.zip'
elif int(_version) > 9: # if greater than 9, take it as .bin file
archive = 'android-ndk-r{0}-linux-{1}.bin'
else:
archive = 'android-ndk-r{0}-linux-{1}.tar.bz2'
@ -311,7 +313,7 @@ class TargetAndroid(Target):
unpacked = 'android-ndk-r{0}'
archive = archive.format(self.android_ndk_version, architecture)
unpacked = unpacked.format(self.android_ndk_version)
url = 'http://dl.google.com/android/ndk/'
url = 'http://dl.google.com/android/repository/'
self.buildozer.download(url,
archive,
cwd=self.buildozer.global_platform_dir)