I'm trying to build an app login with firebase and flutter. When trying to run the app I get the following error messages:
Running Gradle task 'assembleDebug'... C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:10: error: cannot find symbol import androidx.annotation.NonNull; ^ symbol: class NonNull location: package androidx.annotation C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:11: error: cannot find symbol import androidx.annotation.Nullable; ^ symbol: class Nullable location: package androidx.annotation C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:233: error: cannot find symbol public void onMethodCall(final MethodCall call, @nonnull final Result result) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:185: error: cannot find symbol String eventType, @nonnull DataSnapshot snapshot, String previousChildName) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:199: error: cannot find symbol public void onCancelled(@nonnull DatabaseError error) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:207: error: cannot find symbol public void onChildAdded(@nonnull DataSnapshot snapshot, String previousChildName) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:212: error: cannot find symbol public void onChildRemoved(@nonnull DataSnapshot snapshot) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:217: error: cannot find symbol public void onChildChanged(@nonnull DataSnapshot snapshot, String previousChildName) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:222: error: cannot find symbol public void onChildMoved(@nonnull DataSnapshot snapshot, String previousChildName) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:227: error: cannot find symbol public void onDataChange(@nonnull DataSnapshot snapshot) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.EventObserver C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:166: error: cannot find symbol public void onComplete(@nullable DatabaseError error, @nonnull DatabaseReference ref) { ^ symbol: class Nullable location: class FirebaseDatabasePlugin.DefaultCompletionListener C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:166: error: cannot find symbol public void onComplete(@nullable DatabaseError error, @nonnull DatabaseReference ref) { ^ symbol: class NonNull location: class FirebaseDatabasePlugin.DefaultCompletionListener C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:333: error: cannot find symbol public Transaction.Result doTransaction(@nonnull MutableData mutableData) { ^ symbol: class NonNull C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_database-3.0.7\android\src\main\java\io\flutter\plugins\firebase\database\FirebaseDatabasePlugin.java:331: error: cannot find symbol @nonnull ^ symbol: class NonNull 14 errors
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See [...] for more information on the problem and how to fix it.
Finished with error: Gradle task assembleDebug failed with exit code 1
I don't know which files would be helpful for troubleshooting. If you need something please tell me.
Help would be greatly appreciated.
Thanks