code: def read_ndk_version(ndk_dir):
      
      try:
          with open(join(ndk_dir, 'source.properties')) as fileh:
              ndk_data = fileh.read()
      except IOError:
          info('Could not determine NDK version, no source.properties '
               'in the NDK dir')
          return
  
      for line in ndk_data.split('\n'):
          if line.startswith('Pkg.Revision'):
              break
      else:
          info('Could not parse $NDK_DIR/source.properties, not checking '
               'NDK version')
          return
  
      # Line should have the form "Pkg.Revision = ..."
      ndk_version = LooseVersion(line.split('=')[-1].strip())
  
      return ndk_version
docs: Read the NDK version from the NDK dir, if possible