def detect_android_manifest_path
      manifest_file = 'AndroidManifest.xml'
      known_manifest_locations = %W(./#{manifest_file} ./src/main/#{manifest_file})
      known_manifest_locations.find {|loc| File.exist?(loc)} || begin
        Find.find('.') do |path|
          Find.prune if path.start_with?('./.') || path.split('/').size > 3
          if File.directory?(path)
            manifest_file_path = known_manifest_locations.map {|known_location| "#{path}/#{known_location}"}.find {|loc| File.exist?(loc)}
            return manifest_file_path if manifest_file_path and application_path?(path)
          end
        end
      end
    end
def detect_android_manifest_path
      manifest_file = 'AndroidManifest.xml'
      known_manifest_locations = %W(./#{manifest_file} ./src/main/#{manifest_file})
      known_manifest_locations.find {|loc| File.exist?(loc)} || begin
        Find.find('.') do |path|
          Find.prune if path.start_with?('./.') || path.split('/').size > 3
          if File.directory?(path)
            manifest_file_path = known_manifest_locations.map {|known_location| "#{path}/#{known_location}"}.find {|loc| File.exist?(loc)}
            return manifest_file_path if manifest_file_path and application_path?(path)
          end
        end
      end
    end
best effort function to detect the manifest path.
 checks for well known locations and falls back to a recursive search with
 a maximum depth of 2 directory levels