• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Nanocentury · Jan 29, 2014 at 12:12 AM · androidpluginfacebookinstallation

How do I correctly install the Facebook SDK plugin?

My current process is approximatly:

I start with a Disk image of Window 7 x64 with only:

  • Unity 4.3.3f1, Located 'C:\\Program Files(x86)\\Unity'.

  • The adt-bundle-windows-x86-20131030. 'C:\\Users\\Will\\adt...'.

  • The Java 32bit runtime 1.7.0_51-b13, 'C:\\Program Files(x86)\\Java'.

  • 'C:\\Program Files(x86)\\Java\\jr7\\bin;' is manually added to my 'Path' Environment Varible.

As it is I can cleanly deploy Android projects, however I want to use the official Facebook SDK plugin. At this point on my first attempt to install the plugin I dropped it into a project as per the official 'Getting Started' tutorial and this is where I get a bit lost. Even though there is no mention of it in the 'Getting Started' tutorial I find that OpenSSL is a dependancy of the SDK.

So I install the OpenSSL binary 'Win32OpenSSL-1_0_1f' to 'C:\\Program Files(x86)\\OpenSSL-Win32' and when the plugin still can't find it I add 'C:\\Program Files(x86)\\OpenSSL-Win32\\bin;' to my 'Path' Environment Variable.

At this point The plugin's 'Debug Key Hash' starts working and I naievly assume that everything is correct, However; When I attempt to deploy a build I recieve the following error:

 Error building Player: Win32Exception: ApplicationName='C:\Program Files (x86)\Java\jre7\bin\javac.exe', CommandLine='-bootclasspath "C:/Users/Will/adt-bundle-windows-x86-20131030/adt-bundle-windows-x86-20131030/sdk/platforms/android-19\android.jar" -d "C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding ascii "com\DefaultCompany\test\R.java" "com\facebook\android\R.java"', CurrentDirectory='C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\gen'

and the build process is halted.

Could anyone help explain where I am going wrong and to get this plugin to behave?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Nanocentury · Jan 31, 2014 at 05:27 PM

After asking the same question on the Facebook specific StackOverflow I found out that the plugin requires a copy of the JDK to be installed and for the JAVA_HOME environment variable to be pointing to it's bin folder.

In my particular case this looked as follows:

  • jdk-7u51-windows-i586.exe installed to: 'C:\\Program Files (x86)\\Java\\jdk1.7.0_51'.

  • JAVA_HOME Environment variable created, pointing to: 'C:\\Program Files (x86)\\Java\\jdk1.7.0_51\\bin'.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Facebook SDK v4.2.4 - Android - Login not working 11 Answers

android game crash after posting on facebook through native app 1 Answer

Get Facebook User name with Facebook sdk Unity android 3 Answers

Facebook Platform Policies and Promotions Policies 0 Answers

How to get full size FB.feed dialog in android landscape Mode 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges