Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin Forms AppCenter崩溃,无法识别的选择器被发送到类_Xamarin_Xamarin.forms_Xamarin.ios_Visual Studio App Center_Ios14 - Fatal编程技术网

Xamarin Forms AppCenter崩溃,无法识别的选择器被发送到类

Xamarin Forms AppCenter崩溃,无法识别的选择器被发送到类,xamarin,xamarin.forms,xamarin.ios,visual-studio-app-center,ios14,Xamarin,Xamarin.forms,Xamarin.ios,Visual Studio App Center,Ios14,我最近将我的项目改为使用.NETCore2,目前正在重新测试WPF、Android和iOS 不幸的是,我也一直在升级我的NUGET以使UWP项目正常工作,今天早上Xcode也被更新到了12.0版(12A7209),接着是Visual Studio for Mac,所以我还不确定该怪什么 我确实遇到了App Center不想从3.4.1升级到3.4.2的问题,所以我求助于清除Nuget缓存并手动编辑项目解决方案,现在它们都指向3.4.2(最新版本为2020年9月23日) 下面的错误似乎是根本原因,

我最近将我的项目改为使用.NETCore2,目前正在重新测试WPF、Android和iOS

不幸的是,我也一直在升级我的NUGET以使UWP项目正常工作,今天早上Xcode也被更新到了12.0版(12A7209),接着是Visual Studio for Mac,所以我还不确定该怪什么

我确实遇到了App Center不想从3.4.1升级到3.4.2的问题,所以我求助于清除Nuget缓存并手动编辑项目解决方案,现在它们都指向3.4.2(最新版本为2020年9月23日)

下面的错误似乎是根本原因,但我不明白我需要做什么来解决它

NSInvalidArgumentException Reason: +[MSAnalytics sharedInstance]: unrecognized selector sent to class 0x1eb4f2678
崩溃日志

2020-09-23 13:16:16.816 MYAPP
.iOS[3555:1395741] +[MSAnalytics sharedInstance]: unrecognized selector sent to class 0x1eb4f2678
2020-09-23 13:16:19.770 MYAPP
.iOS[3555:1395741] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/10 Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: +[MSAnalytics sharedInstance]: unrecognized selector sent to class 0x1eb4f2678
Native stack trace:
    0   CoreFoundation                      0x000000018d51e5c0 472C9193-115D-34CD-AD1D-0E7E091C9432 + 1185216
    1   libobjc.A.dylib                     0x00000001a159842c objc_exception_throw + 60
    2   CoreFoundation                      0x000000018d42d324 472C9193-115D-34CD-AD1D-0E7E091C9432 + 197412
    3   CoreFoundation                      0x000000018d521130 472C9193-115D-34CD-AD1D-0E7E091C9432 + 1196336
    4   CoreFoundation                      0x000000018d523420 _CF_forwarding_prep_0 + 96
    5   MYAPP
    .iOS                      0x0000000108af7388 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78359712
    6   CoreFoundation                      0x000000018d4af2a8 472C9193-115D-34CD-AD1D-0E7E091C9432 + 729768
    7   CoreFoundation                      0x000000018d4aed80 CFSortIndexes + 320
    8   CoreFoundation                      0x000000018d4017d0 472C9193-115D-34CD-AD1D-0E7E091C9432 + 18384
    9   MYAPP
    .iOS                      0x0000000108af7318 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78359600
    10  MYAPP
    .iOS                      0x0000000108af6f10 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78358568
    11  MYAPP
    .iOS                      0x0000000108af6e54 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78358380
    12  MYAPP
    .iOS                      0x0000000108af5c88 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78353824
    13  MYAPP
    .iOS                      0x00000001081a75b4 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 68595404
    14  MYAPP
    .iOS                      0x000000010819617c _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 68524692
    15  MYAPP
    .iOS                      0x00000001081afeac _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 68630468
    16  MYAPP
    .iOS                      0x00000001081b21a4 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 68639420
    17  MYAPP
    .iOS                      0x0000000107e174b0 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 64859592
    18  MYAPP
    .iOS                      0x00000001071340d8 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 51345904
    19  MYAPP
    .iOS                      0x0000000106d7181c _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 47403316
    20  MYAPP
    .iOS                      0x00000001040ece78 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 722832
    21  MYAPP
    .iOS                      0x00000001049af660 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 9908088
    22  MYAPP
    .iOS                      0x0000000108b671d4 mono_pmip + 28148
    23  MYAPP
    .iOS                      0x0000000108c23420 mono_pmip + 798784
    24  MYAPP
    .iOS                      0x0000000108c26c84 mono_pmip + 813220
    25  MYAPP
    .iOS                      0x000000010403eba8 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 9408
    26  MYAPP
    .iOS                      0x000000010403f39c _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 11444
    27  UIKitCore                           0x000000018fe34a68 47154C6D-47DF-3ABB-A152-56B159B014E4 + 12032616
    28  UIKitCore                           0x000000018fe36ac4 47154C6D-47DF-3ABB-A152-56B159B014E4 + 12040900
    29  UIKitCore                           0x000000018fe3c478 47154C6D-47DF-3ABB-A152-56B159B014E4 + 12063864
    30  UIKitCore                           0x000000018f4cdd70 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2174320
    31  UIKitCore                           0x000000018fa194d4 _UIScenePerformActionsWithLifecycleActionMask + 112
    32  UIKitCore                           0x000000018f4ce8c0 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2177216
    33  UIKitCore                           0x000000018f4ce38c 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2175884
    34  UIKitCore                           0x000000018f4ce6d0 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2176720
    35  UIKitCore                           0x000000018f4cdf48 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2174792
    36  UIKitCore                           0x000000018f4d6078 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2207864
    37  UIKitCore                           0x000000018f92bc28 47154C6D-47DF-3ABB-A152-56B159B014E4 + 6753320
    38  UIKitCore                           0x000000018fa31810 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 272
    39  UIKitCore                           0x000000018f4d5df0 47154C6D-47DF-3ABB-A152-56B159B014E4 + 2207216
    40  UIKitCore                           0x000000018f30aeb0 47154C6D-47DF-3ABB-A152-56B159B014E4 + 327344
    41  UIKitCore                           0x000000018f30986c 47154C6D-47DF-3ABB-A152-56B159B014E4 + 321644
    42  UIKitCore                           0x000000018f30aad8 47154C6D-47DF-3ABB-A152-56B159B014E4 + 326360
    43  UIKitCore                           0x000000018fe3a668 47154C6D-47DF-3ABB-A152-56B159B014E4 + 12056168
    44  UIKitCore                           0x000000018f954274 47154C6D-47DF-3ABB-A152-56B159B014E4 + 6918772
    45  FrontBoardServices                  0x000000019c4d02dc A1960BD9-CE29-3E96-817D-955EBEB140BE + 37596
    46  FrontBoardServices                  0x000000019c4faa00 A1960BD9-CE29-3E96-817D-955EBEB140BE + 211456
    47  FrontBoardServices                  0x000000019c4ded24 A1960BD9-CE29-3E96-817D-955EBEB140BE + 97572
    48  FrontBoardServices                  0x000000019c4fa6d0 A1960BD9-CE29-3E96-817D-955EBEB140BE + 210640
    49  libdispatch.dylib                   0x000000018d11cac8 8E662F82-B1E4-3E7E-A376-18E9755A8F51 + 15048
    50  libdispatch.dylib                   0x000000018d120348 8E662F82-B1E4-3E7E-A376-18E9755A8F51 + 29512
    51  FrontBoardServices                  0x000000019c5220e0 A1960BD9-CE29-3E96-817D-955EBEB140BE + 372960
    52  FrontBoardServices                  0x000000019c521d88 A1960BD9-CE29-3E96-817D-955EBEB140BE + 372104
    53  FrontBoardServices                  0x000000019c5222ac A1960BD9-CE29-3E96-817D-955EBEB140BE + 373420
    54  CoreFoundation                      0x000000018d49b81c 472C9193-115D-34CD-AD1D-0E7E091C9432 + 649244
    55  CoreFoundation                      0x000000018d49b718 472C9193-115D-34CD-AD1D-0E7E091C9432 + 648984
    56  CoreFoundation                      0x000000018d49aa94 472C9193-115D-34CD-AD1D-0E7E091C9432 + 645780
    57  CoreFoundation                      0x000000018d494d20 472C9193-115D-34CD-AD1D-0E7E091C9432 + 621856
    58  CoreFoundation                      0x000000018d4944bc CFRunLoopRunSpecific + 600
    59  GraphicsServices                    0x00000001a3f19820 GSEventRunModal + 164
    60  UIKitCore                           0x000000018fe38734 47154C6D-47DF-3ABB-A152-56B159B014E4 + 12048180
    61  UIKitCore                           0x000000018fe3de10 UIApplicationMain + 168
    62  MYAPP
    .iOS                      0x0000000105c6d838 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 29561168
    63  MYAPP
    .iOS                      0x0000000105328ef0 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 19843080
    64  MYAPP
    .iOS                      0x0000000105328d74 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 19842700
    65  MYAPP
    .iOS                      0x00000001040ec0d0 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 719336
    66  MYAPP
    .iOS                      0x00000001049af660 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 9908088
    67  MYAPP
    .iOS                      0x0000000108b671d4 mono_pmip + 28148
    68  MYAPP
    .iOS                      0x0000000108c23420 mono_pmip + 798784
    69  MYAPP
    .iOS                      0x0000000108c29678 mono_pmip + 823960
    70  MYAPP
    .iOS                      0x0000000108b4578c _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 78680228
    71  MYAPP
    .iOS                      0x0000000108d2fc34 xamarin_localized_string_format_9 + 24676
    72  MYAPP
    .iOS                      0x00000001040ebfd8 _ZN7plcrash2MS5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 719088
    73  libdyld.dylib                       0x000000018d15be60 90A4E82E-250C-35E3-8B2D-51D6D8B1119B + 3680

  at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:407 
  at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 
  at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
  at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr)
  at Microsoft.AppCenter.iOS.Bindings.MSAppCenter.Start (System.String appSecret, ObjCRuntime.Class[] services) [0x00034] in <30815ef5d71a4a61bca2d2557a5ade14>:0 
  at Microsoft.AppCenter.AppCenter.PlatformStart (System.String appSecret, System.Type[] services) [0x0002d] in <556514ba772641f3a49c90b8d313bb6b>:0 
  at Microsoft.AppCenter.AppCenter.Start (System.String appSecret, System.Type[] services) [0x00000] in <556514ba772641f3a49c90b8d313bb6b>:0 
  at MYAPP
  .App.OnStart () [0x0003a] in /Users/rob/GitHub/MYCOMPANY-MYAPP
  -appv2/app/MYAPP
  /MYAPP
  /App.xaml.cs:94 
  at Xamarin.Forms.Application.SendStart () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:346 
  at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00036] in D:\a\1\s\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:58 
  at MYAPP
  .iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x0013e] in /Users/rob/GitHub/MYCOMPANY-MYAPP
  -appv2/app/MYAPP
  /MYAPP
  .iOS/AppDelegate.cs:103 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at MYAPP
  .iOS.Application.Main (System.String[] args) [0x00001] in /Users/rob/GitHub/MYCOMPANY-MYAPP
  -appv2/app/MYAPP
  /MYAPP
  .iOS/Main.cs:16 

这是因为类名与某些Apple私有框架冲突。苹果在iOS 14中添加了
MSAnalytics
类,因此与App Center SDK冲突

此问题的修补程序已发布。在此修补程序中,
MSAnalytics
重命名为
MSAnalytics
,以避免此冲突


相关GutHub问题:

根据您的错误消息,请打开xcode。如果它提示您安装一些其他工具,如此线程,请感谢@LeonLu MSFT这是我检查的第一件事,但我在启动Visual Studio之前安装了这些组件,但我还是仔细检查了一下,没有提示安装其他工具。你能回滚你的Nugets软件包吗?@LeonLu MSFT不幸的是,在启动UWP项目并开始工作时,我决定将项目升级到.netcore(当时似乎是个好主意),所以我无法回滚,因为某些NuGet与.netcore不兼容。不过,我可能可以回滚AppCenter nugets——这听起来是个不错的开始,谢谢你的想法。我在现有项目中获得了与@Devology Ltd相同的体验。我没有解决方案,但在将Xamarin.iOS SDK从14.0.0.0降级到13.20.2.2[link]()之后,该异常不再引发,因此它可能与iOS SDK相关。刚刚使用3.4.3进行了测试,问题已经解决,感谢您的提醒!非常感谢你的帮助。非常感谢!
=== Visual Studio Community 2019 for Mac ===

Version 8.7.8 (build 4)
Installation UUID: 48517e8c-1181-4780-9ee3-ffab8aec9534
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

    Package version: 612000093

=== Mono Framework MDK ===

Runtime:
    Mono 6.12.0.93 (2020-02/620cf538206) (64-bit)
    Package version: 612000093

=== Roslyn (Language Service) ===

3.7.0-6.20427.1+18ede13943b0bfae1b44ef078b2f3923159bcd32

=== NuGet ===

Version: 5.7.0.6702

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.402/Sdks
SDK Versions:
    3.1.402
    3.1.401
    3.1.302
    3.1.301
    3.1.300
    3.1.200
    3.1.102
    3.1.101
    3.0.101
    3.0.100
    2.1.701
    2.1.505
    2.1.504
    2.1.503
    2.1.302
    2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    3.1.8
    3.1.7
    3.1.6
    3.1.5
    3.1.4
    3.1.2
    3.1.1
    3.0.1
    3.0.0
    2.1.22
    2.1.21
    2.1.20
    2.1.19
    2.1.18
    2.1.17
    2.1.16
    2.1.15
    2.1.14
    2.1.13
    2.1.12
    2.1.9
    2.1.8
    2.1.7
    2.1.2
    2.0.5

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.0 (17219)
Build 12A7209

=== Xamarin.Mac ===

Version: 6.20.2.2 (Visual Studio Community)
Hash: 817b6f72a
Branch: d16-7
Build date: 2020-07-18 18:44:59-0400

=== Xamarin.iOS ===

Version: 14.0.0.0 (Visual Studio Community)
Hash: 7ec3751a1
Branch: xcode12
Build date: 2020-09-16 11:33:15-0400

=== Xamarin Designer ===

Version: 16.7.0.495
Hash: 03d50a221
Branch: remotes/origin/d16-7-vsmac
Build date: 2020-08-28 13:12:52 UTC

=== Xamarin.Android ===

Version: 11.0.2.0 (Visual Studio Community)
Commit: xamarin-android/d16-7/025fde9
Android SDK: /Users/rob/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        6.0 (API level 23)
        7.1 (API level 25)
        8.0 (API level 26)
        8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.6
SDK Build Tools Version: 29.0.3

Build Information: 
Mono: 83105ba
Java.Interop: xamarin/java.interop/d16-7@1f3388a
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/rob/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.7.0.13
Hash: 8380518
Branch: remotes/origin/d16-7~2
Build date: 2020-09-16 05:12:24 UTC

=== Android Device Manager ===

Version: 16.7.0.24
Hash: bb090a3
Branch: remotes/origin/d16-7
Build date: 2020-09-16 05:12:46 UTC

=== Build Information ===

Release ID: 807080004
Git revision: 9ea7bef96d65cdc3f4288014a799026ccb1993bc
Build date: 2020-09-16 17:22:54-04
Build branch: release-8.7
Xamarin extensions: 9ea7bef96d65cdc3f4288014a799026ccb1993bc

=== Operating System ===

Mac OS X 10.15.6
Darwin 19.6.0 Darwin Kernel Version 19.6.0
    Thu Jun 18 20:49:00 PDT 2020
    root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64