在我的 Windows 10 上,我有使用 Visual Studio 2022 版本 17.11.5 的 Maui 应用程序
在 MacBook 上我有 Sequoia 15.1 和 Xcode 16.0
它与 Mac 成功配对,但当我尝试使用 iPhone 15 iOS 17.5 或
进行构建时iPhone 15 18.0 我收到错误消息
错误(活动)clang++ 退出,代码为 1:
ld:为“iOS模拟器”构建,但在目标文件中链接(/Users/sam/Library/Caches/Xamarin/mtbs/builds/CompanyMobile/94ebe42756bc16592cb442b5ab77d43d079a57dfde5e720b 972b8ef1e104efc6/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a[arm64][2](MSACAppCenter.o))专为“iOS”打造
clang++:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)CompanyMobile(net8.0-ios) C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0 8.0.8303 argets\Xamarin.Shared.Sdk.targets 1643
如有任何帮助,我们将不胜感激
I found out that this package causing the error above
<PackageReference Include="Microsoft.AppCenter" Version="5.0.4" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.4" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.4" />
I added ForceSimulatorX64ArchitectureInIDE but didn't work as mentioned in one of the discussion.
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'"> <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE> </PropertyGroup>
any help would be appreciated.
有几件事对你不利:
这意味着,你所拥有的就是:
参考资料: