You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode无法安装Runner:Flutter旧项目编译成功却无法部署至iPhone

Flutter项目编译成功但无法安装到iOS设备(错误码-402653081)

问题背景

基于Flutter的旧Xcode项目,编译成功但无法安装至搭载iOS 16.5.1系统的iPhone 13 Pro,未修改任何代码,删除设备上的应用后重新安装仍无效。

解决方法

  • 清理项目缓存

    1. 执行Flutter清理命令:flutter clean
    2. 进入iOS目录执行pod清理与重装:cd ios && pod deintegrate && pod install
    3. 重启Xcode,清理Xcode本地缓存(快捷键Cmd+Shift+K)
  • 检查签名与证书配置

    1. 打开Xcode中的Runner项目,切换到Signing & Capabilities标签页
    2. 确认Team选项已正确选择,证书和描述文件状态正常
    3. 勾选Automatically manage signing,让Xcode自动处理签名流程
  • 适配Xcode与iOS版本兼容性
    当前使用Xcode 14.3.1(对应iOS 16.4 SDK),目标设备为iOS 16.5.1,可尝试:

    1. 确认Xcode已安装iOS 16.5的设备支持包(在Xcode的Preferences > Platforms中检查)
    2. 在项目Deployment Info中,将iOS Deployment Target调整为≤16.5.1的版本(例如16.0)
  • 设备连接与信任设置

    1. 断开并重新连接iPhone,确保Xcode能正常识别设备
    2. 在iPhone的设置 > 通用 > VPN与设备管理中,信任当前开发证书
    3. 重启设备和电脑后再次尝试安装

报错详情

详情

无法安装"Runner"
域:com.apple.dt.MobileDeviceErrorDomain
代码:-402653081
恢复建议:请检查项目设置,确保已构建有效的产品。
用户信息:{
    DVTErrorCreationDateKey = "2023-07-13 15:36:34 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
发生内部API错误。
域:com.apple.dt.MobileDeviceErrorDomain
代码:-402653081
用户信息:{
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE8000067)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x0000000121e704c0 DTDKCreateNSErrorFromAMDErrorCode + 235
    1   DTDeviceKitBase                     0x0000000121eacc96 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x000000010643cd7a DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x0000000121eac9bb -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1409
    4   IDEiOSSupportCore                   0x0000000112ed273a __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3540
    5   DVTFoundation                       0x00000001065725ce __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x00000001065730e2 __DVTDispatchAsync_block_invoke + 196
    7   libdispatch.dylib                   0x00007ff80b4047fb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff80b405a44 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff80b40bac4 _dispatch_lane_serial_drain + 694
    10  libdispatch.dylib                   0x00007ff80b40c5b4 _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff80b416ad7 _dispatch_workloop_worker_thread + 762
    12  libsystem_pthread.dylib             0x00007ff80b581ce3 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff80b580c67 start_wqthread + 15
);
}
--

分析事件:com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone14,2";
    "device_osBuild" = "16.5.1 (20F75)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 7281;
    "operation_errorCode" = "-402653081";
    "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";
    "operation_errorWorker" = IDEInstalliPhoneLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.4";
    "sdk_osVersion" = "16.4";
    "sdk_variant" = iphoneos;
}
--


系统信息

macOS版本13.0(编译版本22A380)
Xcode 14.3.1(21815)(编译版本14E300c)
时间戳:2023-07-13T18:36:34+03:00

内容的提问来源于stack exchange,提问作者SwiftiSwift

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 13:14:54