2017-03-18 57 views
0

對firebase不熟悉,但當我嘗試使用private FirebaseAuth mAuth;時,如他們的電子郵件驗證指南中所述,它無法解析。我已經在該項目中建立了firebase,並且表示我已經正確完成了它。Firebase依賴設置正確,但仍無法解析

我是否需要在該java文件上導入某些內容?

enter image description here

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:25.3.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-auth:10.2.0' 
    compile 'com.android.support:design:25.3.0' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 
+1

發佈模塊build.gradle文件的依賴關係塊。 –

+0

顯示依賴關係 – HaroldSer

+0

已被添加到帖子,謝謝! @qbix –

回答

1

您需要添加:

import com.google.firebase.auth.FirebaseAuth; 

的Android Studio將幫助你這樣一個尚未解決的引用。點擊未解決的符號並輸入Alt + Enter。所需的導入將自動添加。