android – 错误:java.lang.NullPointerException(无错误消息)

这个问题曾多次询问,我会按照这些问题尝试解决问题.该项目已成功构建并运行我几小时前关闭了我的计算机.这个问题让我很生气请帮忙.

信息:

 Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2420Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportCardviewV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportDesign2420Library UP-TO-DATE
    :app:prepareComAndroidSupportRecyclerviewV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCompat2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUi2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUtils2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportFragment2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportMediaCompat2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2420Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:mergeDebugShaders
    Error:java.lang.NullPointerException (no error message)
    Information:BUILD FAILED
    Information:Total time: 1.422 secs
    Information:1 error
    Information:0 warnings
    Information:See complete output in console

build.gradle:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.0'

    defaultConfig {
        applicationId "np.com.yipl.yiplandroidlistme"
        minSdkVersion 15
        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.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:recyclerview-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.2.0'
    compile 'com.mcxiaoke.volley:library:1.0.19'
}

请帮忙 .

最佳答案 这通常是一个gradle构建问题,请尝试更新您的gradle版本.

点赞