Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Multi dex requires Build Tools version

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

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Multi dex requires Build Tools 21.0.0 / Current: 19.1 
like image 236
Stanley Hayford Avatar asked Mar 17 '16 03:03

Stanley Hayford


People also ask

How do I disable multidex?

Show activity on this post. You can disable multidex only if your project doesn't exceed either 65k methods limitation or 65k fields limitation. People seems to be unaware about the 65k fields limitation. You can hit the fields limitation if you're using huge total of resources like drawable, string id, etc.

What is multi Dex?

In Android, the compilers convert your source code into DEX files. This DEX file contains the compiled code used to run the app. But there is a limitation with the DEX file. The DEX file limits the total number of methods that can be referenced within a single DEX file to 64K i.e. 65,536 methods.


1 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.

like image 196
Vishnu Viswanathan Avatar answered Sep 18 '22 19:09

Vishnu Viswanathan