【发布时间】:2018-06-18 16:25:32
【问题描述】:
我正在尝试使用 Firebase-UI 进行电话验证,它可以正常工作,但是当我使用 ((firebase-database gradle 或 firebase-core graddle)) 进行组合时。
给我这个消息是行不通的:"
无法访问文件类文件 com.google.android.gms.internal.zzeui , com.google.android.gms.internal.zzeui 未找到“
这是我的 gradle 代码:
这是有效的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "edu.maaty.myapplication"
minSdkVersion 21
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.1'
implementation 'com.android.support:support-media-compat:26.1.1'
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'
api 'com.android.support:support-v4:26.0.1'
implementation 'com.firebaseui:firebase-ui-auth:3.1.2'
}
apply plugin: 'com.google.gms.google-services'
这不起作用并给我错误!!!!!! :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "edu.maaty.myapplication"
minSdkVersion 21
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.1'
implementation 'com.android.support:support-media-compat:26.1.1'
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'
api 'com.android.support:support-v4:26.0.1'
implementation 'com.firebaseui:firebase-ui-auth:3.1.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
这是(构建脚本)。
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven{
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
标签: android firebase firebaseui