1
我遇到下列錯誤來:不能訪問com.google.android.gms.internal.aad AAD 類文件未找到火力地堡UI無法訪問AAD
我想這會是一個build.gradle問題。但是我無法在我的構建文件中找到任何看起來不對的東西。
這裏是頂級的build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
這裏是應用級build.grade:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.somesite.foo"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "auto"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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.+'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile('com.facebook.android:facebook-android-sdk:4.22.1')
}
apply plugin: 'com.google.gms.google-services'
這裏是正試圖把一切活動開始:
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.SplashTheme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
FirebaseAuth auth = FirebaseAuth.getInstance();
if (auth.getCurrentUser() != null)
{
// already signed in
auth.signOut();
}
else
{
//AuthU
// not signed in
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setIsSmartLockEnabled(false)
.setAvailableProviders(
Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build()))
.build(),
RC_SIGN_IN);
}
}
嘿鮑勃。我嘗試了頂部代碼部分以及底部,它似乎沒有解決它。 – MackProgramsAlot
@MackProgramsAlot:檢查您的設備/模擬器是否安裝了Google Play服務的兼容版本。如果您的應用初始化時在logcat中看到'W/GooglePlayServicesUtil:Google Play服務已過期'消息,則需要升級Play服務。 –
沒有看到.... – MackProgramsAlot