1

I am new to Android Studio.

I want to test my app in my mobile but it's showing that error.

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > java.lang.IllegalStateException: dx.jar is missing

I am using Windows 7 & Android Studio 1.5. What are the available solutions?

Saurav Rastogi
  • 9,575
  • 3
  • 29
  • 41
Saket
  • 79
  • 1
  • 5

1 Answers1

0

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

Did you update your build.gradle as well?

sample:

android {
    compileSdkVersion 24 // this is important
    buildToolsVersion "24" // this also

    defaultConfig {
        applicationId "org.bamboomy.yarne"
        minSdkVersion 15
        targetSdkVersion 24 // recommended
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0' // and don't forget this
    compile 'com.android.support:design:24.0.0' // and this
}