2016-10-20 58 views
0

StoryBoard奇怪的错误/ SIGABRT线程1

几个奇怪的错误出现在我的代码后,我做了一个文件夹的副本,我删除重复的,但我有一些错误剩余..

线程1 SIGABRT运行时出错,编译完成但未加载。 误差上的线与类的AppDelegate

import UIKit 

@UIApplicationMain 
class AppDelegate: UIResponder, UIApplicationDelegate { 

var window: UIWindow? 


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 
    // Override point for customization after application launch. 
    return true 
} 

func applicationWillResignActive(_ application: UIApplication) { 
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 
} 

func applicationDidEnterBackground(_ application: UIApplication) { 
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 
} 

func applicationWillEnterForeground(_ application: UIApplication) { 
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 
} 

func applicationDidBecomeActive(_ application: UIApplication) { 
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 
} 

func applicationWillTerminate(_ application: UIApplication) { 
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 
} 

其他错误在于在图像中。

感谢您的帮助。 Build Failed 1 error

error after adding exception breakpoint

Console

+0

也许原始文件仍然以某种方式被引用。尝试删除它们并将其添加回 – Alexander

回答

0
  1. 当你删除Xcode中的文件时,你应该选择“移动到回收站”。你可以直接将其添加到Xcode中再次,并删除它使用“移动垃圾“。

  2. 转到“Breakpoint navigator”,点击底部的“+”按钮,选择“Exception Breakpoint ...”。当崩溃再次发生时,Xcode应停止在您的异常代码。

+0

我这样做了,它在AppDelegate的类声明中显示了一个绿色的断点行。我添加了照片到帖子 – xteetsx

+0

没有断点,我可以在代码中找到 – xteetsx

+0

检查Xcode控制台窗口,它记录“未知类....”。首先,您需要检查Xcode中是否有“ProficiencyPart”类。如果没有“ProficiencyPart”类,则需要检查故事板以查找哪个视图控制器为“ProficiencyPart”,然后将视图控制器的自定义类更改为默认值。 –

0

有一个Unreferred出口在你的视图控制器,鼠标右键点击你开始的ViewController并确保没有在出口之前

0

前往构建阶段没有感叹号 - >编译源代码,看看是否该应用程序有两个“ViewController.swift”文件。如果是删除你不想要的那个。

希望这可以帮助你!