- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是编程新手,现在正在尝试开发一个应用程序。当我尝试制作一个 Google 登录按钮时,问题就开始了,当我认为我已经实现了这一点时,我尝试了模拟器,但当我点击它们时,我的按钮都没有工作,甚至文本方 block 也没有。然后模拟器开始崩溃,代码为 Thread 1: SIGABRT。我在某个地方读到,您可以执行异常断点以查看问题出在哪里,当我这样做时,我找到了一些行,其中一行显示线程 1:断点 3.1。
import UIKit
import Google
class ViewController: UIViewController, GIDSignInUIDelegate {
override func viewDidLoad() {
super.viewDidLoad()
GIDSignIn.sharedInstance().uiDelegate = self
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBOutlet weak var signinbutton3: GIDSignInButton!
@IBOutlet weak var signinbutton: GIDSignInButton!
func signInWillDispatch(signIn: GIDSignIn!, error: NSError!) {
}
// Present a view that prompts the user to sign in with Google
func signIn(signIn: GIDSignIn!,
presentViewController viewController: UIViewController!) {
self.present(viewController, animated: true, completion: nil)
print("Sign in presented")
}
// Dismiss the "Sign in with Google" view
func signIn(signIn: GIDSignIn!,
dismissViewController viewController: UIViewController!) {
self.dismiss(animated: true, completion: nil)
print("Sign in dismissed")
}
override func viewDidAppear(_ animated: Bool) {
self.performSegue(withIdentifier: "loginView", sender: self); //this line is where the Thread 1: Breakpoint 3.1 was.
}
}
我的问题很快:
- 模拟器上的按钮不起作用
- 模拟器崩溃并在 xcode 上显示我之前用线程 1:SIGABRT 和线程 1:断点 3.1 在最后一行显示的代码序列。
您认为问题是什么,我应该如何解决?编辑我在尝试启动模拟器时收到此消息:
objc[22047]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x113a45cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x11385c6f0). One of the two will be used. Which one is undefined. 2017-06-13 21:49:25.051 Startifyapp[22047] [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. 2017-06-13 21:49:26.013 Startifyapp[22047:788392] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'loginView'' * First throw call stack: ( 0 CoreFoundation 0x000000010bf6eb0b exceptionPreprocess + 171 1 libobjc.A.dylib
0x000000010d2ab141 objc_exception_throw + 48 2 UIKit
0x000000010e00bef3 -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0 3 Startifyapp
0x000000010b971fbf TFC11Startifyapp14ViewController13viewDidAppearfSbT + 127 4 Startifyapp 0x000000010b972021 TToFC11Startifyapp14ViewController13viewDidAppearfSbT + 49 5 UIKit 0x000000010e00ecae -[UIViewController _setViewAppearState:isAnimating:] + 704 6 UIKit 0x000000010e00f6d4 -[UIViewController _endAppearanceTransition:] + 197 7 UIKit 0x000000010dfe1f94 -[UIPresentationController transitionDidFinish:] + 868 8 UIKit 0x000000010e1f6525 -[_UICurrentContextPresentationController transitionDidFinish:] + 44 9 UIKit
0x000000010dfe5af6 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2 + 183 10 UIKit
0x000000010e995d1c -[_UIViewControllerTransitionContext completeTransition:] + 102 11 UIKit
0x000000010dfdeec0 -[UITransitionView notifyDidCompleteTransition:] + 251 12 UIKit 0x000000010dfdeb38 -[UITransitionView _didCompleteTransition:] + 1408 13 UIKit 0x000000010dfe1208 -[UITransitionView _transitionDidStop:finished:] + 104 14 UIKit 0x000000010def2257 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 222 15 UIKit 0x000000010def2796 -[UIViewAnimationState animationDidStop:finished:] + 136 16 QuartzCore 0x00000001151a968e _ZN2CA5Layer23run_animation_callbacksEPv + 306 17 libdispatch.dylib 0x00000001100f305c _dispatch_client_callout + 8 18 libdispatch.dylib 0x00000001100d440b _dispatch_main_queue_callback_4CF + 411 19 CoreFoundation 0x000000010bf33909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 20 CoreFoundation 0x000000010bef9ae4 __CFRunLoopRun + 2164 21 CoreFoundation 0x000000010bef9016 CFRunLoopRunSpecific + 406 22 GraphicsServices
0x0000000111775a24 GSEventRunModal + 62 23 UIKit
0x000000010de66134 UIApplicationMain + 159 24 Startifyapp
0x000000010b9700d7 main + 55 25 libdyld.dylib
0x000000011013f65d start + 1 26 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
最佳答案
我在 Xcode 9 和模拟器上遇到了同样的问题。我使用了一台装有 iOS 11 的真实设备,它工作正常(虽然有一些错误)
关于ios - 在模拟器上运行应用程序时,它崩溃并提示 thread 1 : breakpoint 3. 1. 我该怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44524756/
完成此任务的最佳方法是什么:主线程(线程 A)创建另外两个线程(线程 B 和线程 C)。线程 B 和 C 执行繁重的磁盘 I/O,最终需要将它们创建的资源传递给线程 A,然后调用外部 DLL 文件中的
我是一名对 Julia 语言感兴趣的新手程序员。文档( https://docs.julialang.org/en/v1/base/multi-threading/ )说 Threads.@threa
python中的thread.start_new_thread和threading.Thread.start有什么区别? 我注意到,当调用 start_new_thread 时,新线程会在调用线程终止
我正在学习安卓蓝牙编程。我从 Google 的 Android 开发者网站上复制了大部分代码以供学习。这个想法是监听服务器上的连接是在一个新线程中完成的,而不会阻塞 UI 线程。当收到连接请求时,连接
执行对象方法的线程是否依赖于创建它的线程上的线程? 假设您的 java 应用程序中有两个线程 Thread1 和 Thread2,以及两个类 ClassA 和 ClassB。 您在 Thread1 上
我正在用这段代码测试 C++11 线程,但是在创建线程时,我遇到了错误没有匹配函数调用 'std::thread::thread()'. 这就像我给 std::thread ctr 的函数有什么问题,
我有如下类 eventEngine 和网关: class eventEngine { public: eventEngine(); std::thread threa; std
我需要运行与列表 dirlist 中的元素一样多的 Observer 类线程。当我运行它 python 控制台时,它可以正常工作。 class Observer(Thread): def ru
我在一本 Java 书中读到了下面的代码。我知道主类默认继承 Thread 类,所以 currentThread();而不是 Thread.currentThread();也会做这项工作。 但我不明白
我在我的系统中使用第 3 方 API,该 API 启动一个永久运行的用户线程。一旦我的程序结束,JVM 由于该线程而继续运行,因此我尝试获取此线程引用并通过更改它 thread.setDaemon(t
我所知道的 Python 中的每个对象都可以通过调用来处理其基类初始化: super(BaseClass, self).__init__() threading.Thread 的子类似乎不是这种情况,
在我最近从事的 Xamarin 项目中,我可以看到开发人员使用了 Java.Lang.Thread 以及 System.Threading.Thread(用于非常相似的操作 - 例如在后台加载数据)。
我在 Julia 中运行双循环。代码非常简单。 w = rand(1000,1000) function regular_demo(w::Array{Float64, 2}) n = size
我在 Windows 上使用 Python 3。我正在使用 threading.Thread动态运行一个函数,我可以带参数或不带参数调用它。我正在设置一个列表,其中的第一项是定义路径的字符串。其他参数
我遇到了一些使用线程模块(使用 Python 2.6)管理线程的示例。 我想了解的是这个例子是如何调用“运行”方法的,在哪里调用的。我在任何地方都看不到它。 ThreadUrl 类在 main() 函
假设我从 threading.Thread 派生: from threading import Thread class Worker(Thread): def start(self):
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
使用 WinDbg 和 SOS,我有以下内容: 0:011> !threads ThreadCount: 7 UnstartedThread: 0 BackgroundThread: 4 Pendin
App Engine 给出错误: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfe
我正在尝试将 Swing JEditorPane 嵌入到 JavaFX 项目中,如下代码所示。 Platform.runLater(() -> { SyntaxTester ob = new
我是一名优秀的程序员,十分优秀!