about Multiple dex files define Lcom/google/gson/JsonSerializer

4.1k views Asked by At

I have a problem. When building the project I encounter this:

UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;

When I check my jar files in pre-dexed folder, I found two gson one is 2.2.2 and one is 2.3.1.

I try to find where those gson from and I sadly found that those two are from :

  1. spoon-runner;
  2. alipay.jar;

I think those gson are internal files inside the jar I list before.

Any one have ideas?

1

There are 1 answers

0
Hazem Hagrass On BEST ANSWER

You can either use the GSON within the MMSDK.jar or, if absolutely necessary, unjaring Millennial's JAR and removing the "com/google/gson/" directory and re-jaring it.

You may want to check this for more info