Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task "app:transformClassesWithInstantRunForDebug

If I want to run my Application, I get this error.

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'. java.lang.NullPointerException (no error message)

My Gradle looks like this

pply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.example.herold.datenaufnahme"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile project(':EMDK')
}
like image 440
user5985727 Avatar asked Jul 05 '16 14:07

user5985727


1 Answers

This happened with me when I tried to upgrade gradle plugin version in my project-level. It was

classpath 'com.android.tools.build:gradle:2.1.3'

And then I upgraded it to 2.2-beta, then I got the same error you are getting.

Setting it back to '2.1.3' fixed it for me

like image 69
Islam Ismail Avatar answered Sep 22 '22 21:09

Islam Ismail