My Android studio flutter project started giving cannot find symbol errors.
C:\Users\abc\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-2.2.0\android\src\main\java\io\flutter\plugins\firebasemessaging\FirebaseMe**ssagingPlugin.java:13: error: cannot find symbol
import androidx.annotation.NonNull;**
^
symbol: class NonNull
location: package androidx.annotation
C:\Users\abc\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-2.2.0\android\src\main\java\io\flutter\plugins\firebasemessaging\FirebaseMessagingPlugin.java:14: error: package androidx.localbroadcastmanager.content does not exist
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
^
C:\Users\abc\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-2.2.0\android\src\main\java\io\flutter\plugins\firebasemessaging\FlutterFir**ebaseInstanceIDService.java:9: error: package androidx.localbroadcastmanager.content does not exist
import androidx.localbroadcastmanager.content.LocalBroadcastManager;**
Anyone has an idea what is wrong ?
As suggested by other users I tried to refactor to AndroidX but still getting error even though it is compileSdkVersion 28. I also tried to invalidate cache and restart the android studio.

