我知道我的这个问题已经被问了很多次了,我确实遵循了大多数答案,但这些答案都对我没有帮助。所以这就是我的问题,每当我同步我的项目时,它总是失败。下面是gradle控制台的外观:
执行任务::app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies
按需配置是一种孵化功能。增量java编译是一个孵化特征。用法:app:preBuild最新:app:preDebugBuild最新:app:checkDebugManifest :app:preReleaseBuild构建最新的:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library最新的:app:prepareComAndroidSupportAppcompatV72420Library最新的:app:prepareComAndroidSupportDesign2420Library最新的:app:prepareComAndroidSupportMediarouterV72300Library最新的:app:prepareComAndroidSupportRecyclerviewV72420Library最新的:app:prepareComAndroidSupportSupportCompat2420Library最新的:app:prepareComAndroidSupportSupportCoreUi2420Library最新的:app:prepareComAndroidSupportSupportCoreUtils2420Library :app:prepareComAndroidSupportSupportFragment2420Library UP-最新:app:prepareComAndroidSupportSupportMediaCompat2420Library最新:app:prepareComAndroidSupportSupportV42420Library最新:app:prepareComAndroidSupportSupportVectorDrawable2420Library最新:app:prepareComGoogleAndroidGmsPlayServices940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAds940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAdsLite940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAppindexing940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAppinvite940Library最新:app:prepareComGoogleAndroidGmsPlayServicesAuth940Library:app:prepareComGoogleAndroidGmsPlayServicesAuthBase940Library最新:app:prepareComGoogleAndroidGmsPlayServicesBase940Library最新:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library最新:app:prepareComGoogleAndroidGmsPlayServicesCast940Library最新:app:prepareComGoogleAndroidGmsPlayServicesCastFramework940Library最新:app:prepareComGoogleAndroidGmsPlayServicesClearcut940Library最新:app:prepareComGoogleAndroidGmsPlayServicesContextmanager940Library最新:app:prepareComGoogleAndroidGmsPlayServicesDrive940Library最新:app:prepareComGoogleAndroidGmsPlayServicesFitness940Library最新:app:prepareComGoogleAndroidGmsPlayServicesGames940Library最新:app:prepareComGoogleAndroidGmsPlayServicesGass940Library最新:app:prepareComGoogleAndroidGmsPlayServicesGcm940Library最新:app:prepareComGoogleAndroidGmsPlayServicesIdentity940Library失败:生成失败,出现异常。
堆栈跟踪错误: java.lang.NullPointerException (无错误消息)
构建失败
总时间: 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'
}
apply plugin: 'com.google.gms.google-services'
如何解决这个问题?
https://stackoverflow.com/questions/39183674
复制相似问题