# Failed Building Android with DexBuilder For Debug

**URL:** <https://forum.ionicframework.com/t/failed-building-android-with-dexbuilder-for-debug/157166>\
**Category:** ionic-v1\
**Created:** [February 22, 2019, 8:22am UTC](https://forum.ionicframework.com/t/failed-building-android-with-dexbuilder-for-debug/157166 "2019-02-22T08:22:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chanhope](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chanhope/32/124316_2.png) [@chanhope](https://forum.ionicframework.com/u/chanhope)\
**Post date:** [February 22, 2019, 8:22am UTC](https://forum.ionicframework.com/t/failed-building-android-with-dexbuilder-for-debug/157166/1 "2019-02-22T08:22:24Z")

</div>

```auto
Ionic Info:

   ionic (Ionic CLI) : 4.3.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.9

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms : android 6.4.0
   Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 15 other plugins)

System:

   NodeJS : v8.12.0 (/usr/local/bin/node)
   npm : 6.4.1
   OS : macOS Sierra
   Xcode : Xcode 8.3.2 Build version 8E2002

```

While trying to build an android platform in ionic after updating android studio this error started showing up.

FAILURE: Build failed with an exception.

```auto
What went wrong:
Execution failed for task ’:transformClassesWithDexBuilderForDebug’. >

```

com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException:

```auto
Failed to process /.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.13.1/b49cf3799bd473199e96c4fb9987e9e08395a1c0/okhttp-3.13.1.jar

```

---

<div class="post-metadata">

**Author:** ![pettrin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pettrin/32/127292_2.png) [@pettrin](https://forum.ionicframework.com/u/pettrin)\
**Post date:** [February 22, 2019, 12:15pm UTC](https://forum.ionicframework.com/t/failed-building-android-with-dexbuilder-for-debug/157166/2 "2019-02-22T12:15:54Z")

</div>

> [@Unable to merge dex in ionic](https://forum.ionicframework.com/t/unable-to-merge-dex-in-ionic/119518/5):
>
> i had the same problem today. This worked, run in your project folder: cordova clean then cordova build

---

<div class="post-metadata">

**Author:** ![chanhope](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chanhope/32/124316_2.png) [@chanhope](https://forum.ionicframework.com/u/chanhope)\
**Post date:** [February 22, 2019, 1:52pm UTC](https://forum.ionicframework.com/t/failed-building-android-with-dexbuilder-for-debug/157166/3 "2019-02-22T13:52:17Z")

</div>

nope, it didn’t solve my issue, but editing build.gradle file and modifying these options solved it.

```auto
compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
   }

```

thank you 🙂
