Firebase database getInstance crashes app

后端 未结 3 1088
忘掉有多难
忘掉有多难 2020-12-19 11:02

When running the sample after creating google-service.json, the app crashes when trying to get database reference in SignInActivity

mDatabase = FirebaseDatab         


        
3条回答
  •  梦毁少年i
    2020-12-19 11:48

    mFirebaseDatabaseReference = database.getInstance().getReference("root-element in firebase");

    When you call getReference you need to provide a URL. If your project is bound already in Firebase with the database you have created, use the root element of the data in Firebase as the parameter to getReference().

提交回复
热议问题