Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DefaultFirebaseOptions not configured for windows

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Unsupported operation: DefaultFirebaseOptions have not been configured for windows - you can reconfigure this by running the FlutterFire CLI again.

like image 878
Faraz Riaz Avatar asked Feb 20 '26 08:02

Faraz Riaz


2 Answers

You can initialise using option like this

await Firebase.initializeApp(
// Replace with actual values
options: const FirebaseOptions(
  apiKey: "api key here",
  appId: "app id here",
  messagingSenderId: "messaging id",
  projectId: "project id here",
),

You can get these values from firebase console

like image 171
Kaushik Chandru Avatar answered Feb 23 '26 12:02

Kaushik Chandru


flutterfire configure

running this will show you the options for the configuration of your flutter project like android, web, ios, and macOS.

But if you are not getting the option of any of them you can create an app manually just go to the firebase console, and there you will see something like this. enter image description here

here you can see that under the online placement, portal heading I have two apps only, which are android when you got to your firebase console you will see something different you might have any one out of four missings (android, web, ios, macOS) like in your case there will be no android app you can click simply plus button and add it manually. after adding it you can go to the project and can run it again

flutterfire configure

you will select android and move forward without an error.

like image 21
Mohit kumar Avatar answered Feb 23 '26 10:02

Mohit kumar