许多人提出了这个问题,但可以通过使用此处显示的两种方法之一来解决他们的问题:Flutter iOS build failure error with Multiple commands after the Xcode upgrade
但是,两者都无法解决我的问题。
错误:
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 5.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: Multiple commands produce '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Flutter/Flutter.framework' to '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
warning: ignoring duplicated output file: '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' in shell script build phase '[CP] Embed Pods Frameworks'. This warning represents an extremely serious project misconfiguration and will likely cause some shell scripts in your project to be skipped entirely, leading to other build failures or missing files in the build directory. This will be a hard error in the future. (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
尝试第一种解决方案后:
->更改为旧版构建模式,然后使用flutter clean在XCode和Android Studio中清洁项目
Launching lib/main.dart on iPhone Xʀ in debug mode...
[{"event":"app.progress","params":{"appId":"8c12fe6e-8dad-4659-864a-f3cd80a29844","id":"0","progressId":null,"message":"Running pod install..."}}]Running pod install...
Running Xcode build...
Xcode build done. 31.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:59:20: warning: unused variable 'fileName' [-Wunused-variable]
NSString * fileName=@"";
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:108:17: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
_result(fileName);
^
self->
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:115:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
_result(fileName);
^
self->
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:89:35: warning: unused variable 'assetChangeRequest' [-Wunused-variable]
__block PHAssetChangeRequest *assetChangeRequest = nil;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:15:18: warning: unused variable 'SOURCE_CAMERA' [-Wunused-const-variable]
static const int SOURCE_CAMERA = 0;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:16:18: warning: unused variable 'SOURCE_GALLERY' [-Wunused-const-variable]
static const int SOURCE_GALLERY = 1;
^
6 warnings generated.
In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:2:
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param sharedStyle
~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param allowTapToDismiss
~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: warning: parameter 'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: note: did you mean 'tapToDismissEnabled'?
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
tapToDismissEnabled
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param queueEnabled
~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:19:23: warning: unused variable 'viewController' [-Wunused-variable]
UIViewController *viewController =
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:70:21: warning: unused variable 'topPadding' [-Wunused-variable]
CGFloat topPadding = window.safeAreaInsets.top;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:71:21: warning: unused variable 'bottomPadding' [-Wunused-variable]
CGFloat bottomPadding = window.safeAreaInsets.bottom;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:48:19: warning: unused variable 'size' [-Wunused-variable]
NSNumber *size = call.arguments[@"size"];
^
8 warnings generated.
In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.m:26:
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param sharedStyle
~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param allowTapToDismiss
~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: warning: parameter 'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: note: did you mean 'tapToDismissEnabled'?
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
tapToDismissEnabled
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param queueEnabled
~~~~~~~~~~~~~~~~~~^
4 warnings generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/* com.apple.ibtool.errors */
/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Runner/Base.lproj/Main.storyboard: error: Interface Builder could not open the document Main.storyboard" because it does not exist.
/* com.apple.ibtool.errors */
/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Runner/Base.lproj/LaunchScreen.storyboard: error: Interface Builder could not open the document LaunchScreen.storyboard" because it does not exist.
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
**尝试选项2:**
->使用新的构建系统,在构建阶段从嵌入式框架中删除了Flutter.framework,并进行了清理。
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 28.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:59:20: warning: unused variable 'fileName' [-Wunused-variable]
NSString * fileName=@"";
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:108:17: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
_result(fileName);
^
self->
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:115:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
_result(fileName);
^
self->
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:89:35: warning: unused variable 'assetChangeRequest' [-Wunused-variable]
__block PHAssetChangeRequest *assetChangeRequest = nil;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:15:18: warning: unused variable 'SOURCE_CAMERA' [-Wunused-const-variable]
static const int SOURCE_CAMERA = 0;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/image_saver-1.0.0/ios/Classes/ImageSaverPlugin.m:16:18: warning: unused variable 'SOURCE_GALLERY' [-Wunused-const-variable]
static const int SOURCE_GALLERY = 1;
^
6 warnings generated.
In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.m:26:
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param sharedStyle
~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param allowTapToDismiss
~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: warning: parameter 'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: note: did you mean 'tapToDismissEnabled'?
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
tapToDismissEnabled
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param queueEnabled
~~~~~~~~~~~~~~~~~~^
4 warnings generated.
In file included from /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:2:
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param sharedStyle
~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param allowTapToDismiss
~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: warning: parameter 'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:343:9: note: did you mean 'tapToDismissEnabled'?
@param allowTapToDismiss
^~~~~~~~~~~~~~~~~
tapToDismissEnabled
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph passed to '@param' command [-Wdocumentation]
@param queueEnabled
~~~~~~~~~~~~~~~~~~^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:19:23: warning: unused variable 'viewController' [-Wunused-variable]
UIViewController *viewController =
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:70:21: warning: unused variable 'topPadding' [-Wunused-variable]
CGFloat topPadding = window.safeAreaInsets.top;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:71:21: warning: unused variable 'bottomPadding' [-Wunused-variable]
CGFloat bottomPadding = window.safeAreaInsets.bottom;
^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.2/ios/Classes/FluttertoastPlugin.m:48:19: warning: unused variable 'size' [-Wunused-variable]
NSNumber *size = call.arguments[@"size"];
^
8 warnings generated.
error: Build input file cannot be found: '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Runner/Base.lproj/Main.storyboard'
error: Build input file cannot be found: '/Users/femindharamshi/Downloads/RotiBankProject-Master(Build excluded)/ios/Runner/Base.lproj/LaunchScreen.storyboard'
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
那么,现在,我该如何解决该错误?