public static boolean isMultiDex(File archiveFile){
  ContentReader contentReader=new ContentReader(archiveFile);
  contentReader.load();
  List<String> allClassNames=contentReader.getAllClassNames();
  int numDexes=0;
  for (  String classEntry : allClassNames) {
    if (classEntry.endsWith(".dex")) {
      numDexes++;
      if (numDexes == 2) {
        return true;
      }
    }
  }
  return false;
}

public static boolean isMultiDex ( File archiveFile ) { ContentReader contentReader = new ContentReader ( archiveFile ) ; contentReader . load ( ) ; List < String > allClassNames = contentReader . getAllClassNames ( ) ; int numDexes = 0 ; for ( String classEntry : allClassNames ) { if ( classEntry . endsWith ( ".dex" ) ) { numDexes ++ ; if ( numDexes == 2 ) { return true ; } } } return false ; }
returns true if the apk is multidex
