@@ -414,16 +414,20 @@ def validate_android_tools(opts):
414414 if opts ['ANDROID_NDK_VERSION' ] is None :
415415 opts ['ANDROID_NDK_VERSION' ] = 'r15'
416416
417- ndk_ver = opts ['ANDROID_NDK_VERSION' ]
418- if opts ['ANDROID_PLATFORM' ] is None :
419- opts ['ANDROID_PLATFORM' ] = 'android-26'
417+ ndk_ver = opts ['ANDROID_NDK_VERSION' ]
420418
421419 if opts ['ANDROID_NDK' ] is None :
422420 ndk = guess_android_tooldir ('android-ndk' )
423421 if ndk is None :
424422 error ('Android NDK not found; set $ANDROID_NDK' )
425423 opts ['ANDROID_NDK' ] = ndk
426424
425+ if opts ['ANDROID_API_VERSION' ] is None :
426+ opts ['ANDROID_API_VERSION' ] = '26'
427+
428+ if opts ['ANDROID_PLATFORM' ] is None :
429+ opts ['ANDROID_PLATFORM' ] = 'android-26'
430+
427431 if opts ['ANDROID_SDK' ] is None :
428432 sdk = guess_android_tooldir ('android-sdk' )
429433 if sdk is None :
@@ -532,6 +536,7 @@ def configure_android(opts):
532536
533537 export_opts (opts , ('ANDROID_BUILD_TOOLS' , 'ANDROID_NDK' ,
534538 'ANDROID_PLATFORM' , 'ANDROID_SDK' ,
539+ 'ANDROID_API_VERSION' ,
535540 'JAVA_SDK' , 'AR' , 'CC' , 'CXX' , 'LINK' , 'OBJCOPY' ,
536541 'OBJDUMP' , 'STRIP' ))
537542 args = core_gyp_args (opts ) + ['-Dtarget_arch=' + opts ['TARGET_ARCH' ],
0 commit comments