Facebook和Google Analytics导致致命信号11(SIGSEGV)错误。

4
我在使用Facebook的Android SDK进行连接时,每次都会出现这个异常。EasyTracker的GAThread也产生了完全相同的问题。
6960-6985/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 6985 (Timer-0)
608-669/? E/InputDispatcher﹕ channel '42867090 com.packagename/com.packagename.activities.feed.FeedActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

我该如何修复它?

你解决了这个问题吗? - StErMi
我没有关闭GAThread,所以我一直在面对Facebook的问题。 - Patrick
2个回答

6

你好,我曾经遇到过一个类似的问题。我的问题是由于OkHTTP的SSL管理引起的。 请看OkHTTP的GitHub页面上的此错误问题

我的解决方法是(他们说这将在v2.0中修复):

URL.setURLStreamHandlerFactory(new OkHttpClient());

更新:Square已发布OkHTTP v1.5.0,他们应该已经解决了SSL问题。

Applications that want to use the global SSL context with OkHttp should configure their OkHttpClient instances with the following:

okHttpClient.setSslSocketFactory(HttpsURLConnection.getDefaultSSLSocketFactory());

A simpler solution is to avoid the shared default SSL socket factory. Instead, if you need to customize SSL, do so for your specific OkHttpClient instance only.


1
这就是它了。非常感谢这个解决方案,如果你碰巧在柏林的Droidcon上,请给我发私信,我想请你喝一杯啤酒。 - Patrick
啊哈哈哈,我真的很想和你一起喝那瓶啤酒。我花了四天时间调试,还是不理解问题所在。我这周会去Turin参加droidcon :-) - StErMi
当使用Phonegap时,我应该在哪里实现这段代码? - Liron Harel

0

在使用Facebook Android库中的ShareDialog启动应用时,遇到了相同的应用程序崩溃问题。 我正在使用retrofit和okhttp。 在我的gradle文件中升级两者的当前版本解决了这个问题:

compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.retrofit:retrofit:1.6.1'

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接