Flutter/Dart - FlutterFirebaseMessagingPlugin.java - Build fails with Exception "error: cannot find symbol" Flutter/Dart - FlutterFirebaseMessagingPlugin.java - Build fails with Exception "error: cannot find symbol" dart dart

Flutter/Dart - FlutterFirebaseMessagingPlugin.java - Build fails with Exception "error: cannot find symbol"


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


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

Run the commands:

flutter pub upgradeflutter pub getflutter clean

Invalidate caches and restart

and then try running the app


For me, the problem was that I updated androidx core version from 1.0.1 to 1.5.0 in my app/gradle file but I didn't update it in project level gradle file in resolutionStrategy

enter image description here

enter image description here

They both should be the same.