- Home /
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\test\testLogin1.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\test\testLogin1.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
We are experiencing the very same problem and haven't found a solution yet.
I've seen may solutions which said to to install x86 Java in addition to x64. This didn't help me. Anyone tried this?
I tryed everything i found around in these forum to the point that i think i'll format my c: and do a new clean install.. this plugin is the first one i tryed without any success in 2 years. This plugin shouldn't be on asset store because as it is now on android doesn't work or should be stated that doesn't work on android without heavvy java skills which the normal unity developer doesn't focus on. That's of course is my opinion..
Answer by abhishekdeb · Dec 25, 2013 at 08:34 AM
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:
And please make sure, you are downloading Java SE Development Kit 6u45 and nothing else.
Answer by arrast · Mar 06, 2014 at 12:50 PM
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.
Answer by gabri74 · Dec 09, 2013 at 11:30 AM
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.
Answer by nazia08 · Mar 21, 2014 at 06:32 AM
Try easy facebook android sdk , it's simple LGPL library for android.
Answer by ethanliew · Aug 01, 2017 at 05:50 AM
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
Your answer
Follow this Question
Related Questions
the min sdk version cannot be specified in the androidmanifest.xml file. you have to remove it. 4 Answers
How To fix FacebookSDK merge error in androidmanifest.xml ? 0 Answers
Android build "Failed to re-package resources" 2 Answers
Firebase and Facebook SDK not building 1 Answer
Android Build problem? 2 Answers