安卓+ Facebook连接不工作在发布版本 [英] Android + Facebook Connect not working in release build

查看:155
本文介绍了安卓+ Facebook连接不工作在发布版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,允许用户连接到自己的Facebook账户,并自动做出他的墙后。

I have an Android application that allows the user to connect to his Facebook account and automatically make a post on his wall.

这一切都完美地工作与调试版本(使用备用的WebView对话框或本机应用程序活动)。我使用的是最新的Facebook连接API为Android。

All this is perfectly working with the debug build (using either the fallback webview dialog or the native application activity). I am using the latest Facebook Connect API for Android.

在测试应用程序的发布版本,我注意到,回退的WebView对话框不允许连接到Facebook(输入用户名/密码后,它显示了一个标准的404页,指出它无法找到该网页fbconnect: /成功/#access_token = 3213546 ...)

When testing the release version of the application, I noticed that the fallback webview dialog does not allow to connect to Facebook (after entering the username/password, it shows a standard 404 page that says it could not find the page fbconnect:/success/#access_token=3213546...)

我怀疑的ProGuard已经剥离了一些code,但我无法弄清楚如何确定是什么原因造成的问题。任何人可以提供一些线索,让我在正确的方向?

I suspect proguard has stripped some code but I cannot figure out how to determine what is causing the problem. Could anybody give some clues and get me going in the right direction?

我的proguard.cfg文件包含以下行离开Facebook连接独自:

My proguard.cfg file contains the following lines to leave Facebook Connect alone:

-keep class com.facebook.android.*
-keepclassmembers public class com.facebook.android.Facebook { 
    public static final *; 
}

在usage.txt我能看到的Facebook类,串成员,...

In usage.txt I can see the facebook classes, string members, ...

推荐答案

我固定它的规则如下(但是我不是专家,所以有可能是错误在那里)。

I fixed it with the following rules (however I am no expert so there might be mistakes in there).

-keep class com.facebook.android.*
-keep class android.webkit.WebViewClient
-keep class * extends android.webkit.WebViewClient
-keepclassmembers class * extends android.webkit.WebViewClient { 
    <methods>; 
} 

这篇关于安卓+ Facebook连接不工作在发布版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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