颤抖的Xcode无法运行

时间:2020-04-27 15:37:10

标签: xcode flutter

我只需要打开一个发给我的项目 使用flutter我在Mac PC上运行,并被要求在Xcode上运行 所以我尝试了,每次出现相同的错误 最后一个错误,我在互联网上找不到解决方法

[abdelrhmans-MacBook-Pro:anjez-master softa$ flutter build ios
Building com.AnjezApplication for device (ios-release)...

Automatically signing iOS for device deployment using specified development team in Xcode project: B26V682XJP
Running Xcode build...                                                  

Xcode build done.                                            5.9s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-04-27 17:16:15.629 XCBBuildService[9613:172921] Failed to remove:
    /Users/softa/Library/Developer/Xcode/DerivedData/Runner-ciptqvveswepfdfwscmmoplxkvyx/Build/Intermediates.noindex/XCBuildData/5f0231a6e51d06ee16e07b566b453277-desc.xcbuild:
    unlink(/Users/softa/Library/Developer/Xcode/DerivedData/Runner-ciptqvveswepfdfwscmmoplxkvyx/Build/Intermediates.noindex/XCBuildData/5f0231a6e51d06ee16e07b566b453277-desc.xcbuild): No such file or directory (2)
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/softa/.pub-cache/hosted/pub.dartlang.org/phone_number-0.3.1/ios/Classes/SwiftPhoneNumberPlugin.swift:41:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
            } catch {
              ^
    /Users/softa/.pub-cache/hosted/pub.dartlang.org/phone_number-0.3.1/ios/Classes/SwiftPhoneNumberPlugin.swift:41:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
            } catch {
              ^
    /Users/softa/.pub-cache/hosted/pub.dartlang.org/phone_number-0.3.1/ios/Classes/PhoneNumberPlugin.m:2:9: fatal error: 'phone_number/phone_number-Swift.h' file not found
    #import <phone_number/phone_number-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'Protobuf' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')

Encountered error while building for device.
abdelrhmans-MacBook-Pro:anjez-master softa$ flutter run

Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
Running pod install...                                              4.0s
Running Xcode build...                                                  

Xcode build done.                                            4.5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'Protobuf' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')
    error: Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone SE (2nd generation).
]

这是该错误的照片表示: photo

1 个答案:

答案 0 :(得分:1)

尝试使用flutter clean命令清理项目。