我是Flutter的新手,今天我被困在一个问题上。我无法调试我的应用,因为它说参数格式不正确
Parameter format not correct -
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> Several variant outputs are configured to use the same file name "resources-debug.ap_", filters : MAIN:MAIN
这是我扑扑的医生
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.4)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.46.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
我到处都在寻找答案,但这些答案不适用于我的情况。大多数解决方案都建议更改环境路径。这是我的路径:C:\ src \ flutter \ bin 注意:我使用的是VSCode
请帮助..谢谢!
答案 0 :(得分:0)
当我观察您的Flutter Doctor时,已经定义未配置 Android工具链和 Android Studio 。所以。请按照以下步骤操作。 要解决 Android工具链,请运行“ flutter doctor --android-licenses” 。对于“ Android Studio”,请转到Android Studio->文件->设置->插件->安装Flutter 。在安装flutter的同时,还要求安装dart,单击“确定”,安装后,它将要求重新启动Android Studio。重新启动后转到Flutter终端并运行Flutter Doctor,现在您已经解决了上述问题。只是忽略了最后一个问题,因为它只是表明没有设备连接。
您可以在Windows和Mac的Android Studio中运行Flutter。
答案 1 :(得分:0)
在您的项目文件夹中运行它们,
flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
现在尝试运行