我是Swift的新手。在新的IOS发布之前,我的游戏在Apple商店中运行。现在它可以成功构建,但当我点击开始按钮时它会失败。我找不到我的代码有任何问题。
请检查以下例外情况:-
异常“NSInvalidArgumentException”,原因:“sk action animateWithTextures:textures数组不能为空”***第一次引发调用堆栈:(0 core foundation 0x 0000000109 CCA 34b exception preprocess 171 1 Libo bjc。a . dylib 0x 00000001093 c 521 e objc _ exception _ throw 48 2 core Foundation 0x 00000000109d 33265[n exception raise:format:]197 3 sprite kit 0x 000000010 a 7 E1 f 81[SKAnimate animate animate with textures:time perframe:resize:restore:]120 4 sprite kit 0x 0000000010 a 7 DDD 71[SKActions]animate with textures:time perframe 87 16 ui kit 0x 000000010 aba9d 26-[UIPresentationController initwithspresentedviewcontroller:presentingViewController:]141 17 ui kit 0x 00000010 Abe 230 b-[UIViewController _ presentViewController:with animation:]3956 18 ui kit 0x 000000010 Abe 56 df-[UIViewController _ performCoordinatedPresentOrDismiss:animated:]530 19 ui kit 0x 00000000000010 Abe 51 c 5-[ui 668 29 ui kit 0x 000000010 aa 9d 0d 5-[ui window _ sendTouchesForEvent:]2747 30 ui kit 0x 000000010 aa 9e 7c 3-[ui window send event:]4011 31 ui kit 0x 0000000010 aa 4ba 33-[ui application send event:]371 32 ui kit 0x 0000000010 b 6d _ _ dispatchpropressedeventfromeventfromeventevent queue 3248 33 ui kit 0x 000000000000000
它说你的错误在第一行“SKAction animateWithTextures:textures数组不能为空”检查你的代码,并确保这个投诉得到满足。看起来好像您在调用或使用空数组来调用数据。程序崩溃是因为没有东西可以返回。这就是我所看到的。