Luiz Henrique Ugliano
Luiz Henrique Ugliano

Reputation: 1317

Importing Facebook SDK in Android Studio v. 1.0.2

I am creating a simple project to make login on Facebook. I changed the Eclipse for Android Studio and am lost on how to integrate the SDK with the project. I'm doing the following steps:

  1. I created a project in Android Studio
  2. I downloaded and unzipped Facebook SDK
  3. Project Inside I created, I "File -> Import Module" and put the directory path "facebook". What happens is that after importing the module, project mixed and now do not know which files belong to facebook and what my project.
  4. Soon after I imported, appeared the message "Error: (15, 0) Could not find property 'ANDROID_BUILD_SDK_VERSION' on project ': facebook'."

I looked some tutorials to import the Facebook SDK, and all spoke to edit the "build.gradle" and "gradle.properties" but as I said earlier, the build.gradle that appears only design I created. There appears facebook module that cared.

Upvotes: 0

Views: 2505

Answers (2)

kundan roy
kundan roy

Reputation: 1936

Now you dont need to do all this just add dependency to your build.gradle

 compile 'com.facebook.android:facebook-android-sdk:4.7.0'

Upvotes: 0

Luiz Henrique Ugliano
Luiz Henrique Ugliano

Reputation: 1317

I followed the steps of the link and it worked perfectly.

http://trinitytuts.com/integrating-facebook-sdk-application-android-studio/

Just be careful when adding the "buildToolsVersion" in "build.gradle". In the tutorial mentions buildToolsVersion "20.0.0" but had to edit for buildToolsVersion "21.1.2" as it is the last version I have on my Android Studio.

Another important point is to synchronize only after carrying out the steps.

Upvotes: 2

Related Questions