Flutter在真实的iOS设备上无法构建项目:PhaseScriptExecution
Flutter在真实的iOS设备上无法构建项目:PhaseScriptExecution
当我想在真实的iOS设备上运行我的Flutter应用时,出现了这个错误。我知道,两周前它还很好地工作,但在这两周里,我开发了很多功能,最后是权限处理程序未来,现在我无法在我的真实设备上运行项目。在iOS模拟器上它运行得很好。
所以,让我告诉你我尝试过的事情:
flutter pub cache repair flutter clean flutter run pod install pod install --repo-update arch -x86_64 pod install
此外,在Xcode中,我尝试构建应用程序。结果是什么?
错误构建:命令PhaseScriptExecution执行失败,退出代码非零
[点击查看Xcode设置截图](https://i.stack.imgur.com/lNP02.png)
在调试模式下启动lib/main.dart...
使用Xcode项目中指定的开发团队自动签署iOS设备部署的iOS...
正在运行pod install... 15.9s
正在运行Xcode构建...
Xcode构建完成。 128.9s
构建iOS应用程序失败
来自Xcode构建的错误输出:
↳
2022-12-14 22:35:10.858 xcodebuild[27821:520269] DVTAssertions:在/System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-21157/DTDeviceKitBase/DTDKRemoteDeviceData.m中的警告:382
详细信息:当调用-platform时,来自00008030-001629E10185402E的deviceType为NULL。
对象:
方法:-platform
线程:
请在https://feedbackassistant.apple.com上提交带有此警告消息和任何有用信息的错误报告。
**构建失败**
Xcode的输出:
↳
在路径/var/folders/fp/t7xmc4k101g4g1p4nnr63skh0000gn/T/flutter_tools.suJrEq/flutter_ios_build_temp_dirIzfHDH/temporary_xcresult_bundle写入结果捆绑包
生成1个警告。
生成1个警告。
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1461:38:警告:变量'sum_left'在此处使用时可能未初始化[-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~~
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1426:3:注释:在此处声明了变量'sum_left'
uint16x8_t sum_left;
^
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1461:48:警告:变量'sum_top'在此处使用时可能未初始化[-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1425:3:注释:在此处声明了变量'sum_top'
uint16x8_t sum_top;
^
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1550:38:警告:变量'sum_left'在此处使用时可能未初始化[-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~~
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1509:3:注释:在此处声明了变量'sum_left'
uint16x8_t sum_left;
^
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1550:48:警告:变量'sum_top'在此处使用时可能未初始化[-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1508:3:注释:在此处声明了变量'sum_top'
uint16x8_t sum_top;
^
生成4个警告。
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/enc/backward_references_enc.c:725:12:警告:变量'best_offset'在此处使用时可能未初始化[-Wconditional-uninitialized]
(best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length;
^~~~~~~~~~~
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/libwebp/src/enc/backward_references_enc.c:657:20:注释:将变量'best_offset'初始化为0来消除此警告
int best_offset;
^
= 0
生成1个警告。
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/DKPhotoGallery/DKPhotoGallery/DKPhotoGalleryContentVC.swift:39:52:警告:使用'class'关键字定义一个受类约束的协议已被弃用;请改用'AnyObject'
internal protocol DKPhotoGalleryContentDataSource: class {
^~~~~
AnyObject
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/DKPhotoGallery/DKPhotoGallery/DKPhotoGalleryContentVC.swift:55:50:警告:使用'class'关键字定义一个受类约束的协议已被弃用;请改用'AnyObject'
internal protocol DKPhotoGalleryContentDelegate: class {
^~~~~
AnyObject
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/DKPhotoGallery/DKPhotoGallery/DKPhotoGalleryContentVC.swift:39:52:警告:使用'class'关键字定义一个受类约束的协议已被弃用;请改用'AnyObject'
internal protocol DKPhotoGalleryContentDataSource: class {
^~~~~
AnyObject
/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/DKPhotoGallery/DKPhotoGallery/DKPhotoGalleryContentVC.swift:55:50:警告:使用'class'关键字定义一个受类约束的协议已被弃用;请改用'AnyObject'
internal protocol DKPhotoGalleryContentDelegate: class {
^~~~~
AnyObject
/Users/sahinefe/.pub-cache/hosted/pub.dartlang.org/file_picker-4.6.1/ios/Classes/FilePickerPlugin.m:357:1:警告:实现了废弃的方法[-Wdeprecated-implementations]
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url{
^
在模块'UIKit'中导入自/Users/sahinefe/Documents/Github/flutter_production_app/ios/Pods/Target Support Files/file_picker/file_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIDocumentPickerViewController.h:27:1:注意:此处声明了方法'documentPicker:didPickDocumentAtURL:'
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("documentPicker:didPickDocumentsAtURLs:", ios(8.0, 11.0));
^
生成1个警告。
/Users/sahinefe/.pub-cache/hosted/pub.dartlang.org/firebase_auth-4.2.0/ios/Classes/FLTFirebaseAuthPlugin.m:103:72:警告:将'strong'类型的'FLTFirebaseAuthPlugin *__strong'发送给不兼容类型'id
[[FLTFirebasePluginRegistry sharedInstance] registerFirebasePlugin:self];
^~~~
在模块'firebase_core'中导入自/Users/sahinefe/.pub-cache/hosted/pub.dartlang.org/firebase_auth-4.2.0/ios/Classes/FLTFirebaseAuthPlugin.m:7:
/Users/sahinefe/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.4.0/ios/Classes/FLTFirebasePluginRegistry.h:23:64:注意:将参数传递给参数'firebasePlugin'
- (void)registerFirebasePlugin:(id
^
生成1个警告。
生成1个警告。
无法为设备构建预编译应用程序。
似乎您的应用程序仍然包含默认的签名标识符。
尝试在Xcode中用您的签名id替换'com.example':
打开ios/Runner.xcworkspace
在Alper Efe iPhone’u上启动应用程序时出错。