首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >NullPointerException(无错误消息)

NullPointerException(无错误消息)
EN

Stack Overflow用户
提问于 2018-03-15 06:52:50
回答 2查看 0关注 0票数 0

我知道我的这个问题已经被多次询问过了,我确实遵循了大部分答案,但没有一个帮助我。所以这是我的问题,每当我同步我的项目时,它总是失败。以下是Gradle控制台:

执行任务:[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies] Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :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:prepareComAndroidSupportDesign2420Library UP-TO-DATE :app:prepareComAndroidSupportMediarouterV72300Library 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:prepareComGoogleAndroidGmsPlayServices940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAds940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAdsLite940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppindexing940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppinvite940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAuth940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAuthBase940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesCast940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesCastFramework940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesClearcut940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesContextmanager940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesDrive940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesFitness940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGames940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGass940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGcm940Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesIdentity940Library FAILURE: Build failed with an exception.

  • 出了什么问题:java.lang.NullPointerException(无错误消息)
  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。

构建失败 总时间:7.518秒

这些是我的

代码语言:javascript
复制
dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])

    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.google.android.gms:play-services:9.4.0'
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-location:9.4.0'
    compile 'com.google.android.gms:play-services-appindexing:9.4.0'
    compile 'com.google.firebase:firebase-messaging:9.2.0'
    compile 'com.google.firebase:firebase-database:9.0.2'
    compile 'com.firebase:firebase-client-android:2.4.0'
    compile 'com.google.firebase:firebase-core:9.4.0'
}

apply plugin: 'com.google.gms.google-services'

如何解决这个问题?

EN

回答 2

Stack Overflow用户

发布于 2018-03-15 15:41:30

我已经从项目中删除了.gradle文件夹,并且能够重新构建它。

票数 0
EN

Stack Overflow用户

发布于 2018-03-15 16:38:31

这个问题是在突然重新启动系统时产生的,然后Gradle文件崩溃了。并且那个损坏的文件被缓存了,所以我们需要从你的项目中删除这个文件。

代码语言:txt
复制
your_project_path/.gradle/2.14.1/taskArtifacts

它将重构。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100004262

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档