2019-03-22 14:46:35.302793-0300 CHA.iOS[14335:167957] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3698.93.8/UITableView.m:2062
2019-03-22 14:46:35.349720-0300 CHA.iOS[14335:167957] Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (19), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).
Native stack trace:
0 CoreFoundation 0x00000001022331bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f345735 objc_exception_throw + 48
2 CoreFoundation 0x0000000102232f42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000102e63877 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UIKitCore 0
x0000000118291e2d -[UITableView _endCellAnimationsWithContext:] + 18990
5 UIKitCore 0x00000001182ab711 -[UITableView endUpdates] + 75
6 CHA.iOS 0x0000000101ab6c19 xamarin_dyn_objc_msgSend + 217
7 ??? 0x00000001353e2410 0x0 + 5188232208
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace CHA.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
Xamarin.FormsMaps.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}
我的xamarin ios应用程序崩溃,并在使用try n catch捕获的main.cs中引发了一个异常,这是错误“引发了Object-C异常。名称:NSInternalInconsistencyException异常原因:无效的更新:无效的行数第0节。更新(1)之后现有节中包含的行数必须等于更新(19)之前该节中包含的行数,加上或减去从该节中插入或删除的行数(已插入1个,删除了0个),加上或减去了移入或移出该部分的行数(移入了0个,移出了0个)。 本机堆栈跟踪:”。Android版本工作得很好。我清理并重建了代码,我的Appdelegate文件夹生成已设置为可编译,
我有清理,构建和重建项目 我已经设置了appdelegate文件夹生成操作以进行编译 我已经注释掉了在屏幕上显示数据的页面中的所有代码