1 year ago
#34120
jason
Using Facebook SDK In Unity
I am trying to use the Unity Facebook SDK in my game. Currently, I have added very limited code. I have only imported the FB SDK asset. When I run the application on my dev computer, the app runs fine. But, when I push to an Android device and run it, the app crashes on start, with an error stating:
I am not sure if this question is best asked here or in a different channel, but I trying to use the Facebook SDK in my app. Currently, I am just authenticating with it. My code works fine on my machine, but when I push to an Android device, the app dies right at startup and the error is:
Error AndroidRuntime java.lang.RuntimeException: Unable to get provider com.facebook.FacebookContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path:
I don't believe this is an issue with my code, but here is what I had:
using Facebook.Unity;
private void Awake()
{
FB.Init(OnFBInitComplete, OnFBHideUnity);
}
private void OnFBHideUnity(bool isUnityShown)
{
}
private void OnFBInitComplete()
{
}
I think the issue may be with Google's PlayServicesResolver, but I am not sure how to address it? I have tried deleting the PlayServicesResolver folder the FB SDK adds to the project and installing the Google com.google.android.appbundle-1.6.0 but that did not help. Does anyone have any experience resolving this?
I am using: Unity 2021.2.7f1 and the FB SDK version facebook-unity-sdk-9.2.0 thanks
unity-game-engine
facebook-unity-sdk
facebooksdk.net
0 Answers
Your Answer