所以我試圖用火力地堡存儲,當我複製和粘貼的代碼依賴這些行:如何解決Firebase存儲錯誤?
compile 'com.google.firebase:firebase-storage:9.2.0'
compile 'com.google.firebase:firebase-auth:9.2.0'
我得到,指出生成錯誤:
錯誤:(33 13 )無法解析:com.google.firebase:火力存儲:9.2.0 顯示在文件
顯示在項目結構對話框
和
錯誤:無法解析:com.googl e.firebase:火力核心:9.2.0 打開文件
顯示在項目結構對話框
和
錯誤:(34,13)無法解析:com.google.firebase:火力-AUTH: 9.2.0 在文件中顯示
在項目結構對話框中顯示
下面是我的依賴關係外觀。
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0-beta1'
compile 'com.android.support:design:24.0.0-beta1'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.3.1'
compile 'com.google.firebase:firebase-storage:9.2.0'
compile 'com.google.firebase:firebase-auth:9.2.0'
}
apply plugin: 'com.google.gms.google-services'
此外,Firebase數據庫和Firebase存儲有什麼區別?你什麼時候使用另一個,不是他們都爲你儲存信息?
我覺得'com.firebase:'開始依賴關係a現在不支持Google擁有firebase(比較最後兩個依賴關係)。由於它們高於最新版本,因此可能會導致錯誤。數據庫是一個數據庫 - 您可以在那裏存儲原始數據類型。存儲更像是一個「雲」 - 您可以上傳圖像,媒體等。 – yennsarah
您是否在SDK管理器中安裝了Google Play服務? – LordRaydenMK
@ LordRaydenMK是的,我可以,但也許我需要更新它們?這是唯一可能的解決方案嗎? – TheQ