Search in sources :

Example 1 with DexIndexOverflowException

use of com.android.dex.DexIndexOverflowException in project buck by facebook.

the class MergeTest method main.

public static void main(String[] args) throws Throwable {
    for (int i = 0; i < NUMBER_OF_TRIES; i++) {
        String fileName1 = args[(int) (Math.random() * args.length)];
        String fileName2 = args[(int) (Math.random() * args.length)];
        try {
            Dex toMerge = new Dex(new File(fileName1));
            Dex toMerge2 = new Dex(new File(fileName2));
            new DexMerger(toMerge, toMerge2, CollisionPolicy.KEEP_FIRST).merge();
        } catch (DexIndexOverflowException e) {
        // ignore index overflow
        } catch (Throwable t) {
            System.err.println("Problem merging those 2 dexes: \"" + fileName1 + "\" and \"" + fileName2 + "\"");
            throw t;
        }
    }
}
Also used : DexIndexOverflowException(com.android.dex.DexIndexOverflowException) Dex(com.android.dex.Dex) File(java.io.File)

Aggregations

Dex (com.android.dex.Dex)1 DexIndexOverflowException (com.android.dex.DexIndexOverflowException)1 File (java.io.File)1