【发布时间】:2021-03-06 04:45:38
【问题描述】:
我正在 M1(Apple Silicon)上运行颤振项目。该项目在 Apple Intel 和 Windows 上运行。请在我进入flutter run时查看我的错误消息
Prasaths-MacBook-Pro:Foodom_ios prasathsivanathan$ flutter run
Launching lib/main.dart on iPhone 8 in debug mode...
Running Xcode build...
Xcode build done. 1.6s
Failed to build iOS app
Error output from Xcode build:
↳
objc[20641]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ba8188) and ??
(0x113e842b8). One of the two will be used. Which one is undefined.
objc[20641]: Class AMSupportURLSession is implemented in both ?? (0x204ba81d8) and ?? (0x113e84308). One of
the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthURLPresenter.m:24:
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.h:18:24: error: 'TARGET_OS_WATCHOS' is not defined, evaluates to 0
[-Werror,-Wundef-prefix=TARGET_OS_]
#if !TARGET_OS_OSX && !TARGET_OS_WATCHOS
^
1 error generated.
In file included from
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.m:23:
/Users/prasathsivanathan/Desktop/Projects/Flutter/Test/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/
Utilities/FIRAuthDefaultUIDelegate.h:18:24: error: 'TARGET_OS_WATCHOS' is not defined, evaluates to 0
[-Werror,-Wundef-prefix=TARGET_OS_]
#if !TARGET_OS_OSX && !TARGET_OS_WATCHOS
^
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
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')
Could not build the application for the simulator.
Error launching application on iPhone 8.
【问题讨论】:
-
您找到解决此问题的方法了吗? @Prasath
-
我在网上搜了一下,这和xcode开发者登录有关,检查证书,stackoverflow.com/a/67159933/5359340