Open jempis opened 1 year ago
Hello @jempis, simply instantiate Firebase without passing any params:
await Firebase.initializeApp();
Hi @AngeloAvv , thank for response but with passing or not any params when call Firebase.initializeApp(), the error is the same
E/flutter ( 8504): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(null-error, Host platform returned null value for non-null return value., null, null)
E/flutter ( 8504): #0 FirebaseCoreHostApi.optionsFromResource (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:248:7)
E/flutter ( 8504): <asynchronous suspension>
E/flutter ( 8504): #1 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:89:25)
E/flutter ( 8504): <asynchronous suspension>
E/flutter ( 8504): #2 Firebase.initializeApp (package:firebase_core/src/firebase.dart:43:31)
E/flutter ( 8504): <asynchronous suspension>
E/flutter ( 8504): #3 main (package:toover/main_development.dart:15:3)
E/flutter ( 8504): <asynchronous suspension>
E/flutter ( 8504):
@AngeloAvv This worked for me. Thank you.
Hello @jempis, simply instantiate Firebase without passing any params:
await Firebase.initializeApp();
@jempis sounds like you forgot to add dependencies in the build.gradle files.
Sorry @AngeloAvv , but what are this dependencies? there aren't this dependencies in the tutorial..
@jempis you have to follow the one without flutterfire CLI: https://firebase.flutter.dev/docs/manual-installation
void main() async {
WidgetsFlutterBinding.ensureInitialized();
Platform.isAndroid
? await Firebase.initializeApp(
options: FirebaseOptions(
apiKey: "ApiKey",
appId: "AppId",
messagingSenderId: "MessagingSenderId",
projectId: "ProjectId",
),
)
: await Firebase.initializeApp();
runApp(const MainApp());
}
-follow this youtube video for more: https://www.youtube.com/watch?v=Qn2ysnVMvEE -happy coding.
Hi all, i have try to implement the flutter_flavorizr with 2 flavors e two relative firebase projects. This is the configuration in pubspec.yaml
After launch
flutter pub run flutter_flavorizr
i run app (with launch view) without a problem. But, after i add in app the firebase authentication, on run app return this errorThen i try to add this
await Firebase.initializeApp(name: "App Dev");
but return this:
i call the instance of FirebaseAuthentication with
firebase_auth.FirebaseAuth.instance;
i forgot to configure something?
Thanks