flutter - 如何解决颤振中的 gradle 错误?
问题描述
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.
解决方案
您似乎使用的是旧版本的 cloud_firestore。你能添加你的 .yaml 依赖项吗?
推荐阅读
- botframework - 将机器人添加到 Skype:更改功能部分
- c++ - 将 Windows 上的 dwmapi 与 mingw 链接
- java - Spring mvc @RequestBody如何使用@EmbeddedId解析JPA实体
- python - Python按逗号按行拆分为列表映射
- vba - Excel 工作表名称中的大小写更改
- xml - XML - XSLT - 转义特殊字符
- sql - 在 Firebird 2.1 中将表从一个数据库复制到另一个数据库
- javascript - reactjs中的条件返回语句
- ruby-on-rails - 'belongs_to' 与 form_with 的关联
- asynchronous - 如何在期货中引入特征间接?