任务“app:transformClassesWithInstantRunForDebug"执行失败 [英] Execution failed for task "app:transformClassesWithInstantRunForDebug

查看:37
本文介绍了任务“app:transformClassesWithInstantRunForDebug"执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想运行我的应用程序,我会收到此错误.

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

错误:任务:app:transformClassesWithInstantRunForDebug"的执行失败.java.lang.NullPointerException(无错误提示)

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

我的 Gradle 看起来像这样

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')
}

推荐答案

当我尝试在我的项目级别升级 gradle 插件版本时发生了这种情况.这是

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

类路径'com.android.tools.build:gradle:2.1.3'

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

然后我将其升级到 2.2-beta,然后我遇到了与您相同的错误.

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

将其设置回2.1.3"已为我修复了

Setting it back to '2.1.3' fixed it for me

这篇关于任务“app:transformClassesWithInstantRunForDebug"执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆