1

To import the SDK take the following steps:

  1. Go to Android Studio | New Project | Minimum SDK
  2. Select "API 15: Android 4.0.3" or higher and create your new project.
  3. In your project, open your_app | Gradle Scripts | build.gradle
  4. Add the Maven Central Repository to build.gradle before dependencies:

             repositories {
                      mavenCentral()
                          }
    
  5. Add compile 'com.facebook.android:facebook-android-sdk:[4,5)' to your build.gradle dependencies.

  6. Build your project.

    Or, if you like, you can find the SDK download here(link to facebook developer site ).

****Looking at above way, I think downloading SDK into your project is same as putting an image in your drawable(permanent and more app size) and providing dependency is to using the SDK components whenever needed by loading the component from the site (temporary when needed and less app size)**** Am I right? If not then please correct.

Abhishek Kumar
  • 4,532
  • 5
  • 31
  • 53

1 Answers1

0

When you add the dependencies to build.gradle. gradle will download the SDK for you.

What the documentation suggests is that you can manually download the files and put them yourself.

So the difference is do you want the build tool to download for you or to download it yourself. There are many advantages in making this automated so this is the recommended way.

See this very famous question.

ApriOri
  • 2,618
  • 29
  • 48