flutter - 错误:'AnimatedScale' 是从 /implicit_animations.dart' 和 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart' 导入的
问题描述
我已经升级到颤振 2.5.2 现在在 2 个库中面临这个问题,因为它们是特定于库的,所以无法用作关键字
我无法运行该应用程序
在为 x86 构建的 Android SDK 上以调试模式启动 lib/main.dart...
Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/button.dart:200:14: Error: 'AnimatedScale' is imported from both 'package:flutter/src/widgets/implicit_animations.dart' and 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart'.
child: AnimatedScale(
^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/switch.dart:167:20: Error: 'AnimatedScale' is imported from both 'package:flutter/src/widgets/implicit_animations.dart' and 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart'.
child: AnimatedScale(
^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script '/Users/flipitnews/Downloads/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/flipitnews/Downloads/flutter/bin/flutter'' finished with non-zero exit value 1
* 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
BUILD FAILED in 25s
Exception: Gradle task assembleDebug failed with exit code 1
解决方案
推荐阅读
- python-3.x - 在破折号条形图中添加色阶时代码中的某处出错
- python - Visual Studio 调试 Python 交互:找不到名为 traceback 的模块
- python - 如何计算一行中的条目数并在字段更改时重置
- reactjs - Why my onInput doesn't work to change props.name?
- php - PDO 扩展未在 PHP 中加载
- python - 如何在 Python 中的文件行中找到确切的字符串?
- spring - 无法获得与 Java 1.8 的 Impala JDBC 连接
- python - 为什么 dim=1 在 torch.argmax 中返回行索引?
- python-3.x - 如何修复正在打印的多个布尔值
- python - 计算列表中唯一集的数量