Warn if the user's target API is less than the current minimum recommendation
(api, arch)
| 145 | |
| 146 | |
| 147 | def check_target_api(api, arch): |
| 148 | """Warn if the user's target API is less than the current minimum |
| 149 | recommendation |
| 150 | """ |
| 151 | |
| 152 | # FIXME: Should We remove support for armeabi (ARMv5)? |
| 153 | if api >= ARMEABI_MAX_TARGET_API and arch == 'armeabi': |
| 154 | raise BuildInterruptingException( |
| 155 | UNSUPPORTED_NDK_API_FOR_ARMEABI_MESSAGE.format( |
| 156 | req_ndk_api=api, max_ndk_api=ARMEABI_MAX_TARGET_API |
| 157 | ), |
| 158 | instructions='You probably want to build with --arch=armeabi-v7a instead') |
| 159 | |
| 160 | if api < MIN_TARGET_API: |
| 161 | warning('Target API {} < {}'.format(api, MIN_TARGET_API)) |
| 162 | warning(OLD_API_MESSAGE) |
| 163 | |
| 164 | |
| 165 | MIN_NDK_API = 21 |