Build error "Execution failed for task ':transformDexWithDexForRelease'."

Hello.

I have a project that have facebook authentication and SDK. It worked fine until i had to reinstall my windows. I used the unity option to automatically download Android support stuff and now i’m having some errors when i try to build.

Anyone had a problem like this?

"

  • What went wrong:
    Execution failed for task ‘:transformDexWithDexForRelease’.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/facebook/android/BuildConfig;
"

Thanks for the attention.
Vitor

1 Like

You probably have 2 different versions of the Facebook SDK in your project. try to find those duplications and get rid of them.

2 Likes

I deleted the SDK and reinstalled it, and it’s working. Thanks Liortal.

Someone can close this topic

Hello!

I’m also having some errors when i try to build.

  • What went wrong:
    Execution failed for task ‘:transformDexWithDexForRelease’.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/unity3d/ads/BuildConfig;