@@ -566,9 +566,9 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
566
566
if sdk_dir is None :
567
567
warning ('Android SDK dir was not specified, exiting.' )
568
568
exit (1 )
569
+ self .sdk_dir = sdk_dir
569
570
570
- # Check what Android API we're using, and install platform
571
- # tools if necessary
571
+ # Check what Android API we're using
572
572
android_api = None
573
573
if user_android_api :
574
574
android_api = user_android_api
@@ -583,6 +583,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
583
583
'the default of {}' .format (DEFAULT_ANDROID_API ))
584
584
android_api = DEFAULT_ANDROID_API
585
585
android_api = int (android_api )
586
+ self .android_api = android_api
586
587
587
588
android = sh .Command (join (sdk_dir , 'tools' , 'android' ))
588
589
targets = android ('list' ).stdout .split ('\n ' )
@@ -596,16 +597,10 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
596
597
'it with the SDK android tool.' .format (android_api ))
597
598
warning ('Exiting.' )
598
599
exit (1 )
599
-
600
- exit (1 )
601
-
602
-
603
-
604
-
605
- self .sdk_dir = environ .get ('ANDROIDSDK' , None )
600
+ # AND: If the android api target doesn't exist, we should
601
+ # offer to install it here
606
602
607
603
# AND: We should check for ndk-build and ant?
608
- self .android_api = environ .get ('ANDROIDAPI' , '14' )
609
604
self .ndk_ver = environ .get ('ANDROIDNDKVER' , 'r9' )
610
605
if self .sdk_dir is None :
611
606
ok = False
0 commit comments