public static File findLatestAndroidPlatformFolder(File platformsFolder) {
    File[] platformVersions = platformsFolder.listFiles(new FileFilter() {
      @Override
      public boolean accept(File file) {
        return file.getName().matches(PLATFORM_VERSION_REGEX);
      }
    });

    if (platformVersions == null || platformVersions.length == 0) {
      throw new SelendroidException("No valid Android platform folder found in " + platformsFolder.getName());
    }

    Pattern pattern = Pattern.compile(PLATFORM_VERSION_REGEX);
    Arrays.sort(
      platformVersions,
      new Comparator<File>() {
        @Override
        public int compare(File f1, File f2) {
          Matcher m1 = pattern.matcher(f1.getName());
          Matcher m2 = pattern.matcher(f2.getName());

          m1.find();
          m2.find();

          return Integer.compare(
            Integer.parseInt(m1.group(1)),
            Integer.parseInt(m2.group(1)));
        }
      });

    return platformVersions[platformVersions.length - 1].getAbsoluteFile();
  }
@return path to android.jar of latest android api.
selendroid-standalone/src/main/java/io/selendroid/standalone/android/AndroidSdk.java