android - 无法解决 Firebase 依赖项
问题描述
我的build.gradle
文件如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.my.prohead"
minSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
//testImplementation 'junit:junit:4.12'
//androidTestImplementation 'com.android.support.test:runner:1.0.2'
//androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//implementation 'com.google.firebase:firebase-core:16.0.6'
//implementation 'com.google.firebase:firebase-auth:11.0.4'
// implementation 'com.google.firebase:firebase-database:16.0.5'
//implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
}
apply plugin: 'com.google.gms.google-services'
但是它并没有被编译,虽然如果我尝试更改实现它说依赖关系没有设置,但已经设置了依赖关系!
任何帮助将不胜感激!
解决方案
从您的应用级别build.gradle
文件中删除它:
implementation 'com.google.firebase:firebase-auth:16.1.0:15.0.0'
并只添加这个
implementation 'com.google.firebase:firebase-auth:16.1.0'
推荐阅读
- ruby-on-rails - Rails ActiveAdmin:路由到 /admin/admin/my_resource
- gcc - Make:我们可以在 GNUmakefile 中将目录作为目标吗
- c++ - bits/stdc++.h 包含哪些头文件?
- pycharm - 如何在 PyCharm 中加载模块
- vb.net - 从 VB Net 上的查询中填充类
- caching - 地图上的覆盖图未正确绘制,这是缓存问题吗?
- elasticsearch - _msearch api 无法正常工作
- android - 如何在 Flutter 中对整个应用程序进行圆角处理?
- typescript - 类型“{}”对象上不存在属性“条件”
- javascript - 并行执行命令 - nodejs