首页 文章

Facebook FB.Init()Android Unity失败

提问于
浏览
1

我正在使用Unity 4.1.2我已经从开发者的网站下载了最新的Android SDK for Android软件包 . 包文件名是“FacebookSDK-140401.unitypackage”包是:5.1,2014年4月1日我创建了一个新的空项目 . 导入包 . 打开包附带的示例场景:“InteractiveConsole”我在Unity Editor中玩游戏并按下FB.Init()它工作正常 . 以下是游戏和调试输出的屏幕截图 .

Game Screen

Debug Output

Facebook设置如下:
FacebookSettings

你可以自由使用它们并测试并回复这个问题 .

The problem is this works fine in Unity Editor, but when I build the app and transfer it to my android phone(Samsung Galaxy Tab 2) and play it, the screen opens and everything looks okay. when I hit 'FB.Init' button, the game hangs for a while and it crashes to my home screen.

PS:我的手机上没有安装任何Facebook应用程序 . 有必要吗?

1 回答

  • 0

    我面临同样的问题,在团结编辑器中工作正常,但在Android手机中没有工作 . 我也在使用游戏分析sdk,所以我的Assets文件夹中有两个支持版本:

    • 在Assets \ Plugins \ Android \ support-v4-24.2.0中的第一个

    • 在Assets \ FacebookSDK \ Plugins \ Android \ libs \ support-v4-23.4.0中的第二个

    由于不支持多个支持版本,我删除了第二个 .

    对我来说这是问题,FB.Init()没有在手机上工作 .

    当我删除第一个并保留第二个,它的工作!

相关问题