Xcode无法安装"Runner"编码:-402620392(Flutter应用) [英] Xcode Unable to install "Runner" Code: -402620392 (Flutter app)
问题描述
XCode版本11.1(11A1027)Flutter 1.17.5版
XCode Version 11.1 (11A1027) Flutter version 1.17.5
我尝试在iPad(12.4.6)上运行Flutter应用程序.它的构建没有错误,但是在安装步骤中显示了消息
I try to run my Flutter App on IPad (12.4.6). It builds without errors, but on installing step shows the message
Unable to install "Runner"
Domain: com.apple.dtdevicekit
Code: -402620392
Recovery Suggestion: The certificate used to sign "Runner" has either expired or has been revoked. An updated certificate is required to sign and install the application.
--
The identity used to sign the executable is no longer valid.
Domain: com.apple.dtdevicekit
Code: -402620392
Failure Reason: Please verify that your device’s clock is properly set, and that your signing certificate is not expired. (0xE8008018).
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000012a648047 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x000000012a648749 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000012a687824 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
3 DVTFoundation 0x000000010fd3d756 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x000000012a6875c1 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000012a521f6c __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x000000010fe6e9ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x000000010fe70092 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff6e35e5f8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff6e35f63d _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff6e3658e0 _dispatch_lane_serial_drain + 602
11 libdispatch.dylib 0x00007fff6e366396 _dispatch_lane_invoke + 385
12 libdispatch.dylib 0x00007fff6e36e6ed _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff6e59f611 _pthread_wqthread + 421
14 libsystem_pthread.dylib 0x00007fff6e59f3fd start_wqthread + 13
);
}
--
我试图根据我的个人开发者许可证(未付费)和公司许可证(已付费)运行该程序.所有证书均有效100%.我在某个时候重新创建了它们,但是仍然没有运气:(
I tried to run this under my personal developer license (not paid acc) and under my company license (paid acc). All sertificates are valid 100%. I recreated them all at some point but still no luck :(
也完成了:
-
库/MobileDevice/Provisioning \配置文件/
已清除 -
库/开发人员/Xcode/DerivedData
已清除 - 捆绑ID-我尝试过更改
- 试图创建新项目并运行它-成功运行,但只有第一次,因为其中几乎没有代码.当我添加一些额外的代码并运行
pod install
-失败.
Library/MobileDevice/Provisioning\ Profiles/
were clearedLibrary/Developer/Xcode/DerivedData
was cleared- Bundle Id - I`ve tried to change it
- Tried to create new project and run it - successfully runs, but only first time, when it has almost no code inside. When I add some extra code and run
pod install
- it fails.
奇怪的是,我有另一个Flutter项目,没有任何额外的依赖关系,我可以将其交付给同一设备.
and the strange thing is that I have another Flutter project with no extra dependencies and I can delivery it to the same device.
某些软件包或Info.plist设置(例如 io.flutter.embedded_views_preview
)会破坏一切吗?
Could it be that some packages or Info.plist settings like io.flutter.embedded_views_preview
ruin everything?
找不到任何互连...
Can't find any interconnection...
推荐答案
我在这个问题上呆了大约一个星期,终于尝试了我能想到的一切...最终对我有用的是删除了代码签名权利";是为该项目生成的,因为我注意到我的其他项目没有它们.
I was stuck with this problem for about a week, and finally just tried everything i could think of... What ended up working for me, was deleting the "code signing entitlements" that was generated for the project, because i notices that my other projects didn't have them.
在目标"中进入亚军->构建设置->向下滚动到代码签名权利" ,然后按键盘上的退格键将其删除!
Go to the runner in Targets -> Build Settings -> Scroll down to "Code Signing Entitlements" and delete them by pressing backspace on the keyboard!
删除它们后,它的外观应类似于此图像.
After you have deleted them, it should look something like this image.
让我知道这是否对其他人有用:)
Let me know if this worked for anyone else :)
这篇关于Xcode无法安装"Runner"编码:-402620392(Flutter应用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!