Home » Android » android – Error: Multi dex requires Build Tools version

android – Error: Multi dex requires Build Tools version

Posted by: admin April 23, 2020 Leave a comment


I just updated my android studio and i’m getting this error:

Error:Execution failed for task
java.lang.IllegalStateException: Multi dex requires Build Tools 21.0.0
/ Current: 19.1
How to&Answers:

Here are the couple of things which you can solve the problem.

  1. Change the USB computer connection to Camera(PTP) from Media device(MTP) in your smart phone

  2. Change the Build version to 21.1.2 in build.gradle(Module: app)

    enter image description here

  3. Make sure that Android SDK build tools [build-tool;21.1.2] is installed otherwise install it

    enter image description here

  4. After this just run the project.


A bit old question but I hope you overcome from your problem.

Today I updated my Android Studio to version 2.1 and, and the buildToolVersion to the latest 23.0.3 (as of 8th,May,2016)

The issue you faced happened to me today as well in one of my project and as it described in your error log too, the project built tool is older than the current.

So, if you raise your build tool to the at least the min required or higher, you can successfully build your project.

To do that, open your build.gradle(Module:app), configure it similar to following:

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.yoursite.yourapp"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

Hope it helps to others as well.


Changing buildToolsVersion to 21.1.2 works very well for me. Every time I update Android Studio, I get new errors.


For me, changing the buildToolsVersion from “24.0.0 rc3” to “21.1.2” fixed the issue. This is in the build.gradle (Module: app) file.


I recently read this answer in SO

For me the problem was solved after I removed jar file from my project. it seems that one of the jar files inside my project was using an older version of google play services.


I faced a similar issue and i did 3 workarounds. I don’t know which one fixed the issue. Or may be all of them.

  1. I have java library module. it depends on some jars. I removed
    unnecessary jars.
  2. I extracted code from inside the java library module and added it
    directly to my app and removed the java library module.
  3. I added these lines to my gradle file:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7