android - 错误 :java. lang.NullPointerException(无错误信息)

标签 android 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

构建.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 版本。

关于android - 错误 :java. lang.NullPointerException(无错误信息),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39226834/

相关文章:

android - 使用自定义 View 的自定义属性传入布局资源

Android 将自定义样式设置为 Paint

android - 如何向android中的用户电子邮件帐户发送电子邮件

android - 获取嵌入式 mp3 文件嵌入式艺术失败

android相机导致空指针异常

java - JUnit 中的奇怪 NullPointerException

java - Java:HashMap.getOrDefault返回空值

Android:如何在不更改当前语言环境的情况下获取特定语言环境中的字符串

java - 为什么在Java中调用枚举类的方法时出现空指针异常

nullpointerexception - XTend 空安全抛出 NullPointerException