万能步骤:
- 清理Xcode缓存
- 清理模拟器缓存
- 重启Xcode
- 重新配对手机
无法链接设备
- 错误 dyld_shared_cache_extract_dylibs failed ,将手机链接记录删除后重新配对认证。
- 间歇性链接不上
Details
Could not launch “DebugLaunchScreen”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: iPhoneXR has denied the launch request.
Internal launch error: process launch failed: failed to get the task for process -1
User Info: {
DVTRadarComponentKey = 855031;
RawLLDBErrorMessage = "process launch failed: failed to get the task for process -1";
}
--
检查数据线是否OK,检查手机是否信任电脑.
Flutter EXC_BAD_ACCESS (SIGKILL - CODESIGNING)
iOS 14 构建Flutter debug环境的应用失败
和签名有关,切换成 release模式就ok了,网上说法是和adhoc证书,不支持debug模式打包有关 https://stackoverflow.com/questions/58814361/how-to-fix-termination-reason-namespace-codesigning-code-0x2-error-in-flutte?r=SearchResults
Exception Type: EXC_BAD_ACCESS (SIGKILL - CODESIGNING)
Exception Subtype: UNKNOWN_0x32 at 0x000000010ce81d60
VM Region Info: 0x10ce81d60 is in 0x10ce80000-0x10cf00000; bytes after start: 7520 bytes before end: 516767
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
VM_ALLOCATE 10ce00000-10ce80000 [ 512K] r--/rwx SM=PRV
---> VM_ALLOCATE 10ce80000-10cf00000 [ 512K] r-x/rwx SM=COW
VM_ALLOCATE 10cf00000-10d100000 [ 2048K] rw-/rwx SM=PRV
Termination Reason: Namespace CODESIGNING, Code 0x2
Triggered by Thread: 19
Thread 19 name: DartWorker
Thread 19 Crashed:
0 ??? 0x000000010ce81d60 0 + 4511505760
1 Flutter 0x0000000104bdc128 0x104674000 + 5669160
2 Flutter 0x0000000104e96990 0x104674000 + 8530320
3 Flutter 0x00000001046e5378 0x104674000 + 463736
4 Flutter 0x00000001046e4874 0x104674000 + 460916
5 Flutter 0x00000001046e3ebc 0x104674000 + 458428
6 Flutter 0x00000001046e7b28 0x104674000 + 473896
7 Flutter 0x0000000104c7dc38 0x104674000 + 6331448
8 Flutter 0x0000000104c98b30 0x104674000 + 6441776
9 Flutter 0x0000000104c01bec 0x104674000 + 5823468
10 libsystem_pthread.dylib 0x00000001eb556ca8 0x1eb555000 + 7336
11 libsystem_pthread.dylib 0x00000001eb55f788 0x1eb555000 + 42888
- Building for iOS Simulator, but linking in dylib built for iOS, file '/Users/qxq4633/mobile-connected/ios/Flutter/Flutter.framework/Flutter' for architecture arm64
今天升级Xcode 12后运行Flutter工程,模拟器下缺出现了arm64
,于是检查 buildSettings配置发现 Pod工程中默认将Build Active Architecture
设置为NO,于是修改为Yes,防止打包真机架构,可结果却还是报错,于是打印环境变量,发现Code默认将arm64设置为当前使用架构,模拟器也能执行
ARCHS_STANDARD = arm64
ARCHS_STANDARD_32_64_BIT = armv7 arm64
ARCHS_STANDARD_64_BIT = arm64
ARCHS_STANDARD_INCLUDING_64_BIT = arm64
ARCHS_UNIVERSAL_IPHONE_OS = armv7 arm64
PLATFORM_PREFERRED_ARCH = arm64
VALID_ARCHS = arm64 arm64e armv7 armv7s
将工程中定义了EXCLUDED_ARCHS = arm64
,排除就ok了
网友评论