'How can I solve that gradle error in flutter?

Asset manifest contains a null or empty uri.
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\fluttertoast-2.2.11\android\src\main\java\io\github\ponnamkarthik\toast\fluttertoast\FluttertoastPlugin.java:14: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
                                 ^
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\fluttertoast-2.2.11\android\src\main\java\io\github\ponnamkarthik\toast\fluttertoast\FluttertoastPlugin.java:107: error: cannot find symbol
          Drawable shapeDrawable = ContextCompat.getDrawable(ctx, R.drawable.toast_bg);
                                   ^
  symbol:   variable ContextCompat
  location: class FluttertoastPlugin
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fluttertoast:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU�LD FAILED in 19s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Running Gradle task 'assembleAarRelease'...
Building plugin cloud_firestore...
Exception: The plugin cloud_firestore could not be built due to the issue above.


Solution 1:[1]

It seems like you are using an older version of cloud_firestore. Could you add your .yaml dependencies?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Szepetry