【问题标题】:Could not build the application for the simulator. (M1 chip) [duplicate]无法为模拟器构建应用程序。 (M1芯片)[重复]
【发布时间】:2021-11-14 00:49:45
【问题描述】:

我使用的是 m1 苹果芯片,我试图在 iphone 11 设备上运行我的颤振应用程序,但我收到了这个错误

Launching lib/main.dart on iPhone 11 in debug mode...
lib/main.dart:1
Xcode build done.                                            3.9s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[62383]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1ec79d160) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113e102b8). One of the two will be used. Which one is undefined.
    objc[62383]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1ec79d1b0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113e10308). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **
Xcode's output:
↳
    In file included from /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
    In file included from /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:35:
    In file included from /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/security_connector.h:33:
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/gRPC-Core/src/core/tsi/ssl_transport_security.h:28:10: fatal error: 'openssl/x509.h' file not found
    #include <openssl/x509.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'abseil' from project 'Pods')
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'BoringSSL-GRPC' from project 'Pods')
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-Core' from project 'Pods')
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'leveldb-library' from project 'Pods')
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
    /Users/roeeattias/Desktop/mybarber_ios/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-C++' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 11.
Exited (sigterm)

有人知道我该如何解决这个问题吗?

【问题讨论】:

标签: ios flutter apple-m1


【解决方案1】:

将目标中的架构从 ARCHS_STANDART 更改为 x86_64,它将起作用(此解决方案对我有用)

【讨论】:

    猜你喜欢
    • 2021-04-28
    • 2021-01-18
    • 1970-01-01
    • 2011-01-04
    • 2021-01-23
    • 2021-09-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多