为什么每个与font_awesome_flutter软件包相关的代码都给出错误,包括导入软件包代码?

时间:2020-08-09 10:11:37

标签: flutter package

情况

我在另一台设备上创建了一个项目,而当我在另一台设备上使用同一项目时。它在整个代码中给出了font_awesome_flutter包错误。并给出一个错误,说
URI的目标不存在:'package:font_awesome_flutter / font_awesome_flutter.dart'。 尝试创建URI引用的文件,或尝试使用URI作为已存在的文件。
vs代码以及android studio中都会发生相同的问题

我该如何解决?

尝试

我还尝试了运行flutter pub get,但是没有用。

pubspec.yaml文件

dependencies:
  flutter:
    sdk: flutter
  font_awesome_flutter: ^8.8.1
  cupertino_icons: ^0.1.3

颤抖的医生-v 看起来也不错。

PS G:\Current Work\nikeshoeapp-20200809T055655Z-001\nikeshoeapp> flutter doctor -v
[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 10.0.19041.388], locale en-US)
    • Flutter version 1.20.1 at C:\src\flutter\flutter
    • Framework revision 2ae34518b8 (3 days ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

 
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\Aman Chaudhary\AppData\Local
    • Platform android-30, build-tools 30.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.47.3)
    • VS Code at C:\Users\Aman Chaudhary\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.13.2

[√] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)

• No issues found!

请让我知道我应该尝试什么?

1 个答案:

答案 0 :(得分:0)

尝试文件->使无效/重新启动,然后单击使无效并重新启动。 如果不起作用,请尝试运行此

’’’ 扑干净的酒吧缓存 ’’