我知道这个问题已经被问过很多次了,我的确回答了大多数问题,但是没有一个对我有帮助。所以这就是我的问题,每当我同步项目时,它总是失败。以下是gradle控制台的外观:
执行任务:[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:mockableAndroidJar,:app:prepareDebugUnitTestDependencies]
按需配置是一个孵化功能。增量Java编译是一个令人振奋的功能。:app:preBuild UP-TO-DATE:app:preDebugBuild UP-TO-DATE:app:checkDebugManifest:app:preReleaseBuildUP-TO-DATE:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72420DATE:UP: app:prepareComAndroidSupportDesign2420Library UP-TO-DATE:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE:app:prepareComAndroidSupportRecyclerviewV72420Library UP-TO-DATE:app:prepareComAndroidSupportSupportAppat2420Library UPTO-pre-Com-UATEDate:App:prepareCom-Android: TO-DATE:app:prepareComAndroidSupportSupportFragment2420Library UP-TO-DATE:app:
出了什么问题: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'
}
apply plugin: 'com.google.gms.google-services'
该如何解决呢?
我已经从项目中删除了.gradle文件夹,并能够重新构建它。
注意:请备份,以防万一。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句