public static String optimizedPathFor(File path,File optimizedDirectory){
  String fileName=path.getName();
  if (!fileName.endsWith(ShareConstants.DEX_SUFFIX)) {
    int lastDot=fileName.lastIndexOf(".");
    if (lastDot < 0) {
      fileName+=ShareConstants.DEX_SUFFIX;
    }
 else {
      StringBuilder sb=new StringBuilder(lastDot + 4);
      sb.append(fileName,0,lastDot);
      sb.append(ShareConstants.DEX_SUFFIX);
      fileName=sb.toString();
    }
  }
  File result=new File(optimizedDirectory,fileName);
  return result.getPath();
}

public static String optimizedPathFor ( File path , File optimizedDirectory ) { String fileName = path . getName ( ) ; if ( ! fileName . endsWith ( ShareConstants . DEX_SUFFIX ) ) { int lastDot = fileName . lastIndexOf ( "." ) ; if ( lastDot < 0 ) { fileName += ShareConstants . DEX_SUFFIX ; } else { StringBuilder sb = new StringBuilder ( lastDot + 4 ) ; sb . append ( fileName , 0 , lastDot ) ; sb . append ( ShareConstants . DEX_SUFFIX ) ; fileName = sb . toString ( ) ; } } File result = new File ( optimizedDirectory , fileName ) ; return result . getPath ( ) ; }
change the jar file path as the makedexelements do
