小编C.C*_*ana的帖子

在我的资产上发现“未找到资产的文件或变体”错误

当我尝试运行我的应用程序时,我收到此附加错误。有任何想法吗?(以下)

Launching lib\main.dart on SM J200Y in debug mode...
Running Gradle task 'assembleDebug'...
? Built build\app\outputs\apk\debug\app-debug.apk.
Error detected in pubspec.yaml:
No file or variants found for asset: assets/credentials.json.
Run Code Online (Sandbox Code Playgroud)

我检查了 yaml 文件,格式似乎没问题。我不知所措。(另外,下面)

flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true
  # To add assets to your application, add an assets section, like this:
  assets:
  - assets/credentials.json
Run Code Online (Sandbox Code Playgroud)

dart android-studio flutter

18
推荐指数
4
解决办法
2万
查看次数

标签 统计

android-studio ×1

dart ×1

flutter ×1