I'm receiving this error when try to initialize firebase on my flutter project
MissingPluginException (MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core))
Someone have a clue about what I can do ?
App Gradle
Gradle plugins
Project Gradle
Flutter dependencies
I have setuped the firebase as the Google documentation
await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform);
Already tried on another simulator, already tried to create a fully new simulator, already tried on different devices, already tried with a specific's version of firebase, already tried to add
minifyEnabled false
shrinkResources false
to the gradle, but nothing works, already saw every video on the youtube about it,
The application throw this error for both platforms, android and iOS
Related
Both IOS and Android build was working fine. But recently when I tried to run my app in IOS device I got this error and the screen keeps loading in splash screen.
I tried multiple ways like,
flutter clean
flutter pub get
deleting pubspec.lock file
deleting podfile.lock file
nothing solved my issue.
But when I tried this method,
SharedPreferences.setMockInitialValues({});
The app will run in ios, but when we kill the app and open it again all the values stored in shared preferences will be null.
You can try these steps:
flutter clean
flutter pub get
Invalid Caches and Restart
I am using latest version of flutter 3.7.2
My app has google ads and firebase dependency for which is use following pubs latest versions
admob_flutter:
firebase_messaging:
firebase_core:
Everthing is working perfect but when I have uploaded app on playstore it gives me following error
For solution of above warning i done the change in app level gradle file and following line
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-ads:21.5.0' // this line added for solution
implementation platform('com.google.firebase:firebase-bom:29.3.0')
implementation 'com.google.firebase:firebase-analytics'
}
but after adding above line my firebase stopped working it crash when run app with following error.
NOTE: I have tried flutter clean, reinstall app, flutter pub upgrade
everything is up-to date. Also when i change line implementation
'com.google.android.gms:play-services-ads:21.5.0' to implementation
'com.google.android.gms:play-services-ads:19.2.0' everything is
working perfect
you help me with the part that you say works with only 'com.google.android.gms:play-services-ads:19.2.0' and I had the same problem but trying to solve it by changing this line:
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api 'com.google.firebase:firebase-ads:21.5.0'
}
you try to change firebase-ads:19.1.0 to 21.5.0 and it will let you use
implementation 'com.google.android.gms:play-services-ads:21.5.0'
It works for me, hope helps you.
If you are using 'admob_flutter' and update to 'com.google.android.gms:play-services-ads:2.50.0' you couldn't use Admob, this is because 'admob_flutter' does not support 'play-services-ads:2.50.0'.
In this case, I used 'google_mobile_ads 2.3.0' it's verified and published by 'google.dev
https://pub.dev/packages/google_mobile_ads
I have a flutter project with Android, iOS and Web platforms enabled, I'm using the following firebase plugins:
firebase_performance: ^0.8.2+1
firebase_database: ^9.0.20
cloud_firestore: ^3.4.1
firebase_core: ^1.20.0
All of them are added usgin FlutterFire. This is my main file:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
initializeDateFormatting('es');
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
.....
}
When i remove firebase_perfomance the app works fine, but when i add this plugin the app return the folliwing error message:
Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.testapp.test_performance. Make sure to call FirebaseApp.initializeApp(Context) first.
I haven't google-services.json beacause I understand that it is not necessary if I use flutterfire
I run into same problem today :(
It's weird that seems Firebase App won't auto initialized before the flutter startup, if you setup the firebase plugin with flutterfire cli. And no one mentioned this problem.
Solution:
You can follow the https://firebase.google.com/docs/android/setup to setup the google services plugin,the firebase service seems would initialized to get the performance monitor works in early stage of APP.
I have the same issue with firebase_performance package. I solved the issue by running the following commands again.
dart pub global activate flutterfire_cli
flutterfire configure
I was using firebase_messaging 7.0.0 all is working fine but i need to update my flutter so i have upgrade firebase_messaging to 10.0.9 now its stop working on getToken.
When app load it keep crashing and showing
E/flutter (17162): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: [firebase_messaging/unknown] java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR
I have try everything
flutter clean
implementation 'com.google.firebase:firebase-messaging:20.1.0'
But it's not working if I comment my getToken then my app is fine. I didn't find any solution on GitHub or StackOverflow. I have checked my google-service.json etc all is fine
Yes now it's different.
please follow steps here:
firebase messaging doc
and you have to add firebase_core package to your dependencies
and follow this steps too: firebase_core doc
I am facing an issue which cannot understand.
When I run a project the compiling is ok but at runtime when I call any OneSignal plugin method this happen:
I tried to do flutter clean and flutter pub get.
I generated a new android folder creating another project.
Nothing changed, still facing the issue.
Has someone found a solution to this guys?
I've already opened a github issue for this problem:
https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/379
Hope I'm not doing something wrong.