close

[Solved] Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol”

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol” in flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol” Error Occurs ?

Today I updated to Null Safety sdk: ">=2.12.0 <3.0.0" I’m getting errors when I try to build my Flutter app in Android Studio.

Inshort error saying FlutterFirebaseMessagingPlugin.java “cannot find symbol”. So what does this mean and how do I fix it.

How to Solve Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol” Error?

Question: How to Solve Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol” Error?
Answer: To resolve this issue just Open pubspec.yaml file. Get the latest version of firebase_messaging from here. Updated to the latest version. Then flutter pub get. That’s all.

Solution 1

As I updated my SDK version to null safety all we need to do is just Update your firebase_messaging in pusbpec.yaml to version that supports null-safety (for example: firebase_messaging: ^10.0.0, and call flutter pub get from terminal

  1. Open pubspec.yaml file.
  2. Get the latest version of firebase_messaging from here.
  3. Updated to latest verison.
  4. Then flutter pub get.
  5. That’s all.

Solution 2

First, get the latest versions of your firebase dependencies from pub.dev

Run the commands:

Invalidate caches and restart

and then try running the app

Summery

So, It’s All About Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol”. I hope this tutorial helps you to add Borders to your Widget. Please Comment Below if You stucks anywhere with my code.

Also Check Out Below Tutorials

1 thought on “[Solved] Flutter/Dart – FlutterFirebaseMessagingPlugin.java – Build fails with Exception “error: cannot find symbol””

Leave a Comment

%d bloggers like this: