简体   繁体   中英

java.lang.ClassNotFoundException: com.facebook.unity.FB using Unity Facebook plugin v5.0.4 Beta

I installed the v5.0.4 beta facebook unity plugin to resolve the orientation problem, since my game is in landscape mode. Everything works fine when publishing from Unity3d, but when I export into an eclipse project and run the game from it, I get the error:

AndroidJavaException: java.lang.ClassNotFoundException: com.facebook.unity.FB

I guess there is some file missing, any ideas how to resolve that?

Thanks!

The facebook sdk for unity has been changed to an additional library project from jar file. Since then, when building the project in unity, all facebook sdk files must be copied to the temporary project directory when building to build together. But it seems that all sdk files are not copied to the proper directory under the temporary android project for build. You can check it in the Temp/StaggingArea/android-libraries directory while building the project in unity. There must be Facebook directory in android-libraries while building your project. I'm not sure if it's unity problem or facebook problem. I think you should report it to the Unity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM