我正在尝试通过将其链接到Firebase存储来关联我的应用
FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference storageRef = storage.getReferenceFromUrl("gs://fir-example-c4312.appspot.com");
但是当我打开它和此日志时,它会崩溃
FATAL EXCEPTION: main
03-03 13:56:35.444 11712 11712 E AndroidRuntime Process: com.androidchatapp, PID: 11712
03-03 13:56:35.444 11712 11712 E AndroidRuntime java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.androidchatapp.Login$100000003.onClick(Login.java:71)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.view.View.performClick(View.java:5675)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.view.View$PerformClick.run(View.java:22641)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.os.Handler.handleCallback(Handler.java:836)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:103)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.os.Looper.loop(Looper.java:203)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:6251)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at java.lang.reflect.Method.invoke(Native Method)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
03-03 13:56:35.444 11712 11712 E AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
这是我的火力发源地
compile 'com.google.firebase:firebase-storage:9.2.1+'
firebase存储的规则已经成立,数据库实时工作没有问题。