【发布时间】:2018-08-19 03:50:14
【问题描述】:
我正在使用 Android Studio 3.1.3 并尝试构建连接到 Firebase 的 Android 应用。
build.gradle 文件中出现以下错误。
我的build.gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.asu.fit.firebaseapp"
minSdkVersion 19
targetSdkVersion 27
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:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-core:16.0.0'
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'
}
apply plugin: 'com.google.gms.google-services'
您能帮我解决这个问题吗?
【问题讨论】:
-
添加到@Reaz Murshed 的答案,如果你想追踪依赖的版本运行
./gradlew app:dependencies。它会列出你所有的依赖和版本,这可能有助于调试你的问题。