我无法导入"导入com.google.firebase.auth.FirebaseAuth;"对于我的Android Studio。
我已经检查了一切。所有构建gradle都使用最新的Firebase版本进行设置。
允许我做的唯一导入是" FirebaseAuthException"和" FirebaseUser"
有人帮助我。谢谢。
Project Build.Gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
的build.gradle(模块:应用)
repositories {
maven {
url "https://maven.google.com"
}
maven { url "https://jitpack.io" }
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.rick.teddyfy"
minSdkVersion 23
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 {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//Design layout
compile 'com.android.support:design:26.1.0'
compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.3'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
//firebase authentication
'com.google.firebase:firebase-auth:10.2.6'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:2)
依赖项有语法错误,它应该是这样的:
compile 'com.google.firebase:firebase-auth:10.2.6'