+
+def CheckSystemRequirements():
+ ''' Check for android, ant, template dir '''
+ sys.stdout.write('Checking system requirements...')
+ sys.stdout.flush()
+ # check android install
+ android_path = Which('android')
+ if android_path is None:
+ print('failed\nThe "android" binary could not be found. Check your Android '
+ 'SDK installation and your PATH environment variable.')
+ sys.exit(1)
+ if GetAndroidApiLevel(android_path) < 14:
+ print('failed\nPlease install Android API level (>=14) first.')
+ sys.exit(3)
+
+ # Check ant install
+ ant_path = Which('ant')
+ if ant_path is None:
+ print('failed\nAnt could not be found. Please make sure it is installed.')
+ sys.exit(4)
+
+ print('ok')
+
+