5

I am trying to write a program that can make Facebook updates but i have issues adding the Facebook dependency. I already have the sdk but couldn't add to my project because... Err even though i have tried adding the gradle.prperties file to the extracted Facebook folder as a comment suggested here

Next i tried adding as suggested on the Facebook official page but i hit this snag...Err2

Now, because if the price of data where I'm from, I'd rather not go online since I already have the sdk locally so my question is how can i manually cache the sdk into my project?

EDIT: For clarity, my question is HOW DO I ADD THE FACEBOOK SDK INTO MY PROJECT WITHOUT GOING ONLINE (i.e. OFFLINE BUILD)?

kbluue
  • 369
  • 1
  • 5
  • 20

3 Answers3

3

Download Facebook Android SDK 4.24.0 ARR it from here

Then, In order to import a .aar library:

  1. Add a .aar file in libs folder.
  2. Use "New Module" option under File menu.
  3. Import the .aar file.
  4. Build gradle and compile the project.
ZeroOne
  • 8,996
  • 4
  • 27
  • 45
1

From my experience, all you need to do is set android studio's offline compile option and build it once. After that, you can re-build as much as you can without going online.

Here is a link on setting the offline option. Hope it helps: https://hackernoon.com/speed-up-gradle-build-in-android-studio-80a5f74ac9ed?gi=2bb71fe06274

Mohammed
  • 21
  • 2
1

try this offline mode on Android Studio

disable offlineenable offline

A Maharaja
  • 1,227
  • 1
  • 11
  • 20