Skip to content

Commit 30fdc6e

Browse files
committed
Added error when api and arch conflict
1 parent cd6b78d commit 30fdc6e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pythonforandroid/build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
212212
android_api = int(android_api)
213213
self.android_api = android_api
214214

215+
if self.android_api >= 21 and self.archs[0].arch == 'armeabi':
216+
error('Asked to build for armeabi architecture with API '
217+
'{}, but API 21 or greater does not support armeabi'.format(
218+
self.android_api))
219+
error('You probably want to build with --arch=armeabi-v7a instead')
220+
exit(1)
221+
215222
android = sh.Command(join(sdk_dir, 'tools', 'android'))
216223
targets = android('list').stdout.decode('utf-8').split('\n')
217224
apis = [s for s in targets if re.match(r'^ *API level: ', s)]

0 commit comments

Comments
 (0)