ios Xcode:无法安装“Runner”-请检查您的项目设置并确保已构建有效的产品

ie3xauqp  于 12个月前  发布在  iOS
关注(0)|答案(1)|浏览(140)

尝试在Xcode中使用真实的iOS设备运行Flutter项目,但我收到了下面屏幕截图中显示的错误/消息。
这个错误发生在我升级Flutter/dart版本之后。
到目前为止我尝试过的:

  • 在Xcode ->窗口->设备和模拟器->从连接的设备中删除应用程序。
  • 从真实的设备卸载/删除已安装的应用程序。
  • 清除Xcode缓存
  • 重命名捆绑包ID
  • 确保最新的Xcode设备支持文件是最新的,并匹配我的iPhone的当前操作系统版本(16.6)
  • 手动导入预配配置文件(有时自动管理签名可能会导致问题)
  • 在Targets -> Runner -> Build Settings中,确保Bundle ID没有错误。

还是没找到。

详细信息:

Unable to install "Runner"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
Recovery Suggestion: Please check your project settings and ensure that a valid product has been built.
User Info: {
    DVTErrorCreationDateKey = "2023-10-13 21:29:22 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
There was an internal API error.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
User Info: {
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE8000067)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x000000010bcb2c90 DTDKCreateNSErrorFromAMDErrorCode + 235
    1   DTDeviceKitBase                     0x000000010bcef2ee __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x00000001016f1e01 DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x000000010bcef016 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1409
    4   IDEiOSSupportCore                   0x000000010d67f7a0 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3520
    5   DVTFoundation                       0x0000000101827a09 __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x000000010182851d __DVTDispatchAsync_block_invoke + 196
    7   libdispatch.dylib                   0x00007ff81257e7fb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff81257fa44 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff812585ac4 _dispatch_lane_serial_drain + 694
    10  libdispatch.dylib                   0x00007ff8125865b4 _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff812590ad7 _dispatch_workloop_worker_thread + 762
    12  libsystem_pthread.dylib             0x00007ff8126fbce3 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff8126fac67 start_wqthread + 15
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone12,1";
    "device_osBuild" = "16.6.1 (20G81)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 15270;
    "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_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.2";
    "sdk_osVersion" = "16.2";
    "sdk_variant" = iphoneos;
}
--

System Information

macOS Version 13.2.1 (Build 22D68)
Xcode 14.2 (21534) (Build 14C18)
Timestamp: 2023-10-13T17:29:22-04:00

在VSCode上运行我的真实的iOS设备也没有成功,下面是错误消息:

No Provisioning Profile was found for your project's Bundle Identifier or your 
device. You can create a new Provisioning Profile for your project in Xcode for 
your team by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

It's also possible that a previously installed app with the same Bundle 
Identifier was signed with a different certificate.

For more information, please visit:
  https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
fkaflof6

fkaflof61#

这个问题可能有很多解决方案,我尝试了flutter run命令,它为我工作。你可以在这个类似的问题Here中找到答案。

相关问题