ios 应用程序崩溃“libc++abi.dylib:以 NSException (lldb) 类型的未捕获异常终止”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40602226/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
App crashing "libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)"
提问by Yeah
So, after 1 hour of googling I still can't fix this error that I got. Whats happening is that every time I go to click my "Sign Up" button, the app crashes, its suppose to redirect me to a different view where the user can sign up with there email and password. I tried many things other users have posted but none of them seem to be working.
所以,经过 1 小时的谷歌搜索后,我仍然无法修复我得到的这个错误。发生的事情是,每次我点击“注册”按钮时,应用程序都会崩溃,它假设将我重定向到一个不同的视图,用户可以在那里使用电子邮件和密码进行注册。我尝试了其他用户发布的许多内容,但似乎没有一个有效。
error code:
错误代码:
2016-11-14 23:30:52.363967 FHCI[4785:1536750] [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:52.364 FHCI[4785] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:53.561590 FHCI[4785:1536709] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.'
*** First throw call stack:
(0x186e4a1c0 0x18588455c 0x186e4a108 0x100107358 0x100107120 0x1000a795c 0x1000a7a40 0x18cca50b0 0x18cca4c78 0x18d668ae4 0x18cfefb08 0x18cff72c4 0x18d010d04 0x18d013e5c 0x18cd97b54 0x18d464b9c 0x18d465d84 0x18d465b8c 0x18d465e5c 0x18ccda484 0x18ccda404 0x18ccc48b8 0x18ccd9cf0 0x18ccd9818 0x18ccd4a60 0x18cca552c 0x18d492a54 0x18d48c4bc 0x186df8278 0x186df7bc0 0x186df57c0 0x186d24048 0x1887aa198 0x18cd102fc 0x18cd0b034 0x1000aa388 0x185d085b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Picture of my code
我的代码图片
Story board
故事板
回答by COVID19
Earlier, I have faced the same issue. Fix it by below solutions.
早些时候,我遇到了同样的问题。通过以下解决方案修复它。
Solution:1
解决方案:1
Please make sure
FIRApp.configure()
the statement executes once throughout the project. If you have written more then one time then you have to remove your second unused statement. It will solve your problem.
请确保
FIRApp.configure()
语句在整个项目中执行一次。如果您写了不止一次,那么您必须删除第二个未使用的语句。它会解决你的问题。
Solution:2
解决方案:2
1 ) Remove pod file from project (How to remove pod file)
2 ) Remove Old
GoogleService-Info
file from the project.3 ) Download
GoogleService-Info
and add it into the project.4 ) Add
pods
file Again.5) Put the Below method in
Appdelegate
file.
1) 从项目中删除 pod 文件(如何删除 pod 文件)
2 )
GoogleService-Info
从项目中删除旧文件。3) 下载
GoogleService-Info
并添加到项目中。4 )
pods
再次添加文件。5)将下面的方法放在
Appdelegate
文件中。
override init() {
super.init()
FIRApp.configure()
}
回答by Chuck Boris
回答by imike
In my case I removed Main.storyboard
but forgot to remove in from General target's settings. Removing it solved unexpected crash on app launch.
在我的情况下,我删除了Main.storyboard
但忘记从常规目标的设置中删除。删除它解决了应用程序启动时的意外崩溃。