can't build android app with facebook sdk

Hello,

we are trying to integrate facebook sdk on our project, but we are stuck after the correct generation of the hash key.

FB Init() work correctly in play mode, i receive logging in =true;

But

when i try to build my apk for Android i get this error:

Error building Player: Win32Exception: ApplicationName=‘C:\Program Files (x86)\Java\jre7\bin\javac.exe’, CommandLine=‘-bootclasspath “C:/Users/gabriele/AppData/Local/Android/android-sdk/platforms/android-19\android.jar” -d “E:\unity4Projects est estLogin1.2\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding ascii “com\ExclusiveStudios\myGame\R.java” “com\facebook\android\R.java”’, CurrentDirectory=‘E:\unity4Projects est estLogin1.2\Temp\StagingArea\gen’

we searched a lot around for information and we tryed some different options offered by this fantastic comunity, but none worked, if we understand correctly there should be a problem on android Manifest Main Activity?

We are currently experimenting with just the facebook sdk with the demo sceene, so nothing else could create bugs.

It seems that this is a problem which a lot of us has found, but we haven’t found the answer.

Thank you

Got it working guyz… I am using Windows 8.1 pro 64 bit.
Download the latest Facebook SDK. Download Java 6 SDK 32-bit. It will work.
Caution: Even if you are using a 64 bit OS, use only Java 6 SDK 32 bit. Java 7 does not work.
Links:

  1. Facebook SDK
  2. Java 6 SDK ( 32-bit)

And please make sure, you are downloading Java SE Development Kit 6u45 and nothing else.

If you want to build a project with the Facebook Unity SDK you have to make sure that you ONLY have the Java SDK, not the JRE.

If you have the JRE installed, it will crash.

ok the only way to make a build without that error is to use FB SDK 4.2.4 which are old.

that’s not a real solution because we can’t use the latest sdk but at least i can get a
build.

Hope this helps you guys.

Try easy facebook android sdk , it’s simple LGPL library for android.

You may try to remove this aar ( which is duplicated in FB SDK with android SDK )

Assets\Plugins\Android\support-v4-25.3.1.aar