问题
Unity: 4.3.1 Device:Samsung I9300 Facebook SDK for Unity: 5.0.2 Beta
When I use Facebook SDK for Unity 4.3.6, this works well.
When I use 5.0.2 Beta, it does not work. When I run FB.Init
on device, it shows
The Facebook Dll : not Loaded
Facebook settings are the same as in 4.3.6, but I changed the Class Name com.facebook.unity.FBUnityPlayerActivity
to com.facebook.unity.FBUnityDeepLinkingActivity
in the facebook.com. But this doesn't work either.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
</activity>
<activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
</activity>
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 487550674688377" />
</application>
</manifest>
回答1:
Assets/Plugins/Android/Facebook is missing the bin folder in this release. I don't think there is any Android binary included. Could try building it in Eclipse from the source code.
来源:https://stackoverflow.com/questions/21277607/facebook-sdk-for-unity-5-0-2-beta-doesnt-work-on-android-device