gpt4 book ai didi

android-studio - 在我的 Assets 上获取 "No file or variants found for asset"发现错误

转载 作者:行者123 更新时间:2023-12-03 02:39:49 26 4
gpt4 key购买 nike

尝试运行我的应用程序时,出现此错误。有任何想法吗?
(以下)

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.

我已经检查了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

最佳答案

检查 Assets 的缩进。通常,从新行开始应有3个空格。

assets:
- assets/credentials.json // <-- count three spaces from start

关于android-studio - 在我的 Assets 上获取 "No file or variants found for asset"发现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59657146/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com