I have a fragment that performs user registration and login using Firebase. However, I'm having trouble with the initializeApp (Context) method. Here is the code:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_perfil, container, false);
FirebaseApp.initializeApp(getContext());
mAuth = FirebaseAuth.getInstance();
The error message:
Default FirebaseApp is not initialized in this process com.redentor.mikha.scientia. Make sure to call FirebaseApp.initializeApp (Context) first. at com.google.firebase.FirebaseApp.getInstance (Unknown Source)