错误的出口APK - FacebookSDK [英] Error on exported apk - FacebookSDK

查看:144
本文介绍了错误的出口APK - FacebookSDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有这个程序和几个activitys通过做任务Asynk的querys外部数据库,并与结果它填充的布局。

So, I have this app and several activitys do querys an external database via Asynk Task and with the results it populates the layout.

到目前为止好,它的所有工作正常,直到我出口的应用程序。经过本人签收出口程序的时候,开始在本次活动使用Facebook的SDK崩溃(它是唯一一个谁做)。从JSON字符串它得到一个名字和Facebook的SDK它张贴在Facebook上的链接,在描述了该名称。 (我不知道这个问题是在这里,但不应该是),所以,我决定运行导出APK登录猫,而她捉迷藏(我做她的清单可调试),并获取该日志,使我连更困惑:

So far so good, it all worked fine until I exported the app. After I sign exported the app it started crashing at this activity that uses the facebook sdk ( and it's the only one who does ). from the json String it gets a name and with the facebook sdk it posts a link on facebook that in the description has that name. ( I don't know if the problem is here but shouldn't be ) so, I decided to run log cat on the exported apk while she was runnning ( I made her debuggable on the manifest ) and retrieved this log that made me even more confused:

11-04 16:01:19.877: E/AndroidRuntime(11372): FATAL EXCEPTION: main
11-04 16:01:19.877: E/AndroidRuntime(11372): com.facebook.ae: com.facebook.c.g got an unexpected method signature: public abstract org.json.JSONObject com.facebook.c.d.q()
11-04 16:01:19.877: E/AndroidRuntime(11372):    at com.facebook.c.i.a(Unknown Source)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at com.facebook.c.g.invoke(Unknown Source)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at $Proxy0.q(Native Method)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at com.facebook.b.aM.onPostExecute(Unknown Source)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.os.AsyncTask.finish(AsyncTask.java:631)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.os.AsyncTask.access$600(AsyncTask.java:177)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.os.Handler.dispatchMessage(Handler.java:107)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.os.Looper.loop(Looper.java:194)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at android.app.ActivityThread.main(ActivityThread.java:5422)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at java.lang.reflect.Method.invokeNative(Native Method)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at java.lang.reflect.Method.invoke(Method.java:525)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:837)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
11-04 16:01:19.877: E/AndroidRuntime(11372):    at dalvik.system.NativeStart.main(Native Method)
11-04 16:01:19.911: I/System.out(11372): [socket][/192.168.0.14:33448] connected

任何人有什么可能是错误的?一个线索

Anyone has a clue of what might be wrong?

我可以张贴code,如果你想但这种活动是巨大的。

I can post the code if you want but this activity is huge.

推荐答案

所以,看来问题是在ProGuard的-project.txt。

So, it seems that the problem was on the proguard-project.txt.

我完全忘了添加此行:

-keep class com.facebook.** {*;}

嗯,这里是答案,proguard的可以是一个痛苦的对接,以便它可以帮助有theyr APK崩溃和不具有线索,为什么其他人。

Well, here is the answer, proguard can be a pain in the butt so it might help other people that have theyr apk crashing and don't having a clue why.

从现在开始,每个库我将添加到我的项目,我检查的ProGuard TXT。

From now on every library I'll add to my project I'm checking the proguard txt.

这篇关于错误的出口APK - FacebookSDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆