How to add Android Android SDK using @AAR

Like many, I also switch to Android Studio. The Android project I have is an IntelliJ Classic project with two key dependencies: Google Play services and facebook SDK. I developed a project for a new build of Gradle using game services, which is pretty simple, but I am afraid that switching the SDK library for Facebook is not so simple.

I heard and saw the use of @aar in dependencies. Does this dependency style already exist for facebook SDK? I assume that there should be others that use facebook sdk with a new build based on Android Studio / Gradle.

It would be great to get step-by-step instructions on how to do this.

+4
source share
2 answers

Facebook now publishes AAR for Maven Central. To use it, just add a normal dependency:

buildscript { repositories { mavenCentral() } } dependencies { compile('com.facebook.android:facebook-android-sdk:3.20.0') } 
+8
source

Facebook does not currently provide aar lib. However, you can use aar archives from other sources or compile them yourself.

you can use: https://github.com/mente/facebook-api-android-aar

0
source

All Articles