0

Hey there I have been searching for an answer to this on stack overflow and google but nothing seems to be up to date for the newest android studio and the old answers aren't working So I am wondering if someone could help me out here?

Theses don't work

Android Studio 0.8.1 - how to use Facebook SDK? using facebook sdk in android studio http://trinitytuts.com/integrating-facebook-sdk-application-android-studio/

Thanks for the help in advance.

EDIT

I get this error enter image description here

This is my settings.gradle file

enter image description here

Community
  • 1
  • 1
iqueqiorio
  • 1,149
  • 2
  • 35
  • 78

2 Answers2

1

For you can add the sdk of facebook in your project with Android Studio.

You only need follow this steps:

  • Download the SDK of Facebook at Facebook Developers
  • Copy the folder facebook in your root project.
  • You need set this folder how to module. Go to the file settings.gradle and include this ':name_of_folder'
  • Now only need put this line in your app.gradle ` compile project (':name_of_folder')

That's all.

Ok, this error is very common. You will need set this global variables in your settings.gradle

ANDROID_BUILD_TARGET_SDK_VERSION=19
ANDROID_BUILD_TOOLS_VERSION=19
ANDROID_BUILD_SDK_VERSION=1
joselufo
  • 3,393
  • 3
  • 23
  • 37
0
     dependencies { 
 compile 'com.facebook.android:facebook-android-sdk:3.21.1' 
}

Install Facebook SDK in latest Android Studio

Community
  • 1
  • 1
Cristiana Chavez
  • 11,349
  • 5
  • 55
  • 54