Fix NDK version detection for NDK 12.

This commit is contained in:
Ghislain MARY 2016-06-24 16:07:30 +02:00
parent 6a4cbe00f1
commit 68ab1ab4b1

View file

@ -138,8 +138,8 @@ class AndroidPreparator(prepare.Preparator):
python_config_files.append(os.path.join(root, filename))
if len(python_config_files) > 0:
version = open(python_config_files[0]).readlines()[0]
res = re.match('^.*/aosp-ndk-r(\d+).*$', version)
version = int(res.group(1))
res = re.match('^.*/(aosp-)?ndk-r(\d+).*$', version)
version = int(res.group(2))
retval = False
else:
error("Could not get Android NDK version!")