我正在尝试在同一项目中使用firebase消息传递,auth和数据库,但是,当我尝试将auth依赖项添加到gradle中时,按照firebase“入门”指南的指示,我遇到了2308 298个与构建依赖项有关的错误。
这是我的应用程序特定的build.gradle
应用插件:“com.android.application”
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.name.withheld"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
maxProcessCount 4 // this is the default value
javaMaxHeapSize "2g"
}
// Enabling multidex support.
//multiDexEnabled true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
//I originally had all the play services enabled but now as a comment suggested I mm trying split dependencies.
//compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.android.support:design:24.1.1'
compile 'com.google.android.gms:play-services-base:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.firebase:firebase-database:9.4.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
另外,我可以加快构建速度的任何方式都会有所帮助
编辑:
I am still getting errors but this time they are about random com.google.android.gms: dependencies I have never heard of like
游戏服务任务
游戏服务地下室
本地:internal_impl-24.1.1.jar
和我以前使用过的一样
com.android.support:support-v4
com.android.support:recyclerview-v7
is there something that I did wronge to mess up my build enviroment, I am using android studios 2.1.2 on windows 8.1
最佳答案
compile 'com.google.firebase:firebase-auth:9.2.0'
全部更改为9.2.0并检查一次
关于android - 在奇怪的配置中添加firebase auth会破坏gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39302581/