【发布时间】:2020-01-30 20:10:53
【问题描述】:
在我尝试安装 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 仍然会抛出同样的错误。如何恢复我的应用程序并原生更改状态栏的颜色?
【问题讨论】:
-
你使用哪个版本的依赖?
-
正如它在pub.dev
flutter_statusbarcolor: ^0.2.2中提到的那样 -
尝试使用旧版本,例如 0.2.0
标签: ios flutter dart flutter-dependencies dart-pub