我知道我的这个问题已被多次询问,我确实按照大部分答案,但没有一个帮助我.所以这是我的问题,每当我同步我的项目时它总是失败.以下是gradle控制台的外观:
执行任务:[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies]
按需配置是一项孵化功能.增量java编译是一个孵化功能.: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:应用:prepareComAndroidSupportDesign2420Library UP-TO-DATE:应用:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE:应用:prepareComAndroidSupportRecyclerviewV72420Library UP-TO-DATE:应用:prepareComAndroidSupportSupportCompat2420Library UP-TO-DATE:应用:prepareComAndroidSupportSupportCoreUi2420Library UP-TO-DATE:应用:prepareComAndroidSupportSupportCoreUtils2420Library UP-至今: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 :prepareComGoogleAndroidG msPlayServicesAds940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAdsLite940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAppindexing940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAppinvite940Library UP-TO-日期:应用:prepareComGoogleAndroidGmsPlayServicesAuth940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesAuthBase940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesCast940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesCastFramework940Library最新消息:app:prepareComGoogleAndroidGmsPlayServicesClearcut940Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesContextmanager940Library UP-TO-DATE:app :prepareComGoogleAndroidGmsPlayServicesDrive940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesFitness940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesGames940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesGass940Library UP-TO-DATE:应用:prepareComGoogleAndroidGmsPlayServicesGcm940Library UP-TO-DATE:应用程序:prepareComGoogleAndroidGmsPlayServicesIdentity940Library失败:建立因例外而失败.
出了什么问题:java.lang.NullPointerException(没有错误消息)
尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行以获取更多日志输出.
建筑失败
总时间:7.518秒
这些是我的依赖
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' …Run Code Online (Sandbox Code Playgroud)