我尝试安装flutter_statusbarcolor软件包后,构建失败。一切正常,然后再使用Mac和XCode模拟器。我只想更改状态栏的颜色。 This approach不起作用。

$ flutter run
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running Xcode build...
Xcode build done.                                            1,3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    note: Using new build systemnote: Planning buildnote: Constructing build descriptionerror: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file
    'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error:
    /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target
    'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support
    Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find
    included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error:
    /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target
    'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support
    Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
Then我从依赖项和~/.pub-cache/hosted/pub.dartlang.org/目录中的所有文件中删除了此程序包。但是Flutter仍然会抛出相同的错误。如何本地还原我的应用程序并更改状态栏的颜色?

最佳答案

这对我有帮助:



引用:https://github.com/X-Wei/flutter_catalog/issues/26#issuecomment-548923989

08-06 08:27