androidandroid-sdk-toolsandroid-studio-2.1dx

Build fails due to missing dx.jar


Whenever I try to build the project, it shows the following 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: dx.jar is missing

I have recently updated my sdk and after that uninstalled android studio unchecking the sdk and downloaded the IDE(just because I wanted to update studio) without sdk and made it to use the present sdk.

Please help! I am not finding any solution working yet.


Solution

  • Deleting sdk platform tools and build tools and reinstalling them worked for me.