Facebook FB.Init()失败Android Unity [英] Facebook FB.Init() Fail for Android Unity

查看:334
本文介绍了Facebook FB.Init()失败Android Unity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Unity 4.1.2
我已经从开发人员的网站下载了用于Android软件包的最新的Facebook SDK for unity。包文件名是
FacebookSDK-140401.unitypackage
包是:5.1,2010年4月1日
我创建了一个新的空项目。导入包装。
打开包中随附的示例场景:InteractiveConsole
我在Unity编辑器中玩了游戏,并按下FB.Init()功能正常。
以下是游戏截图和调试输出。

I am using Unity 4.1.2 I have downloaded the latest Facebook SDK for Android package for unity from the developer's site. The package file name is "FacebookSDK-140401.unitypackage" The package is: 5.1 , April 1,2014 I created a new empty project. Imported the package. Opened the Example scene that came with the package: "InteractiveConsole" I played the game in my Unity Editor and pressed FB.Init() it worked fine. Here are the screenshots of the game and debug output.


Facebook设置如下:

The Facebook Settings are as follows:

您可以自由使用它们并测试并恢复此问题。

you are free to use them and test and revert to this question.

问题是在Unity Editor中可以正常工作,但是当我构建应用程序并将其传输到我的Android手机(Samsung Galaxy Tab 2)并播放它时,屏幕会打开,一切都看起来不错。当我点击FB.Init按钮时,游戏挂起一段时间,它崩溃到我的主屏幕。

PS:我没有任何安装在我手机上的Facebook应用程序。是否有必要?

PS: I don't have any Facebook App installed on my phone. Is it necessary?

推荐答案

我遇到同样的问题,在统一编辑器中工作正常,但在Android手机中无法工作。我也在使用游戏分析sdk,所以我的Assets文件夹中有两个支持版本:

I faced same problem, working fine in unity editor, but not working in android phone. I was using game analytics sdk also, so I got two support-version in my Assets folder:


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

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

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

As not support more than one support-version, I deleted 2nd one.

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

For me it was the problem, FB.Init() was not working in phone.

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

When I delete First one and keep the 2nd one, Its worked!!!

这篇关于Facebook FB.Init()失败Android Unity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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