I tried via import module
but I'm always getting
Error:(13, 0) Could not find property 'ANDROID_BUILD_MIN_SDK_VERSION' on project ':facebook'.
I didn't find a tutorial how to use the Facebook SDK with the latest Android Studio...
I tried via import module
but I'm always getting
Error:(13, 0) Could not find property 'ANDROID_BUILD_MIN_SDK_VERSION' on project ':facebook'.
I didn't find a tutorial how to use the Facebook SDK with the latest Android Studio...
Now you can use version 3.21.1 from maven
https://developers.facebook.com/docs/android/
EXPLINATION:
The following constants can be defined in your project gradle.properties:
Those are used in the Facebook sdk as build gradle settings. To specify your use of the sdk. (it's encouraged that those values match your project values!).
"Code Reusability and Dependancy!" you can use those same values as gradle build settings in all build.gradle files for your project and all other modules inside your project. use them they same way they are used in the Facebook build.gradle file.
Example Benefit: Changing the minimum sdk version on gradle.properties will automatically change it for all your modules build.gradle.
Using Facebook SDK 3.23 in Android Studio 1.1 preview 2
Two choices :
*Maven Repository for the Facebook SDK.
check for the latest version facebook sdk
OR
*Follow the steps below:
1.Download facebook sdk https://developers.facebook.com/docs/android/
2.Unzip the archive facebook-android-sdk-3.23.0
3.File menu->Import Module
4.Chose “facebook” folder inside the unzipped archive.
5.Go to directory facebook/build.gradle change this part
This:
To proper sdk version
example:
6.Click your project and press F4 ,go to 'dependencies' tab, click '+', 'module dependency' and select your imported facebook module.
7.Resync and rebuild
For anybody still wondering, there is finally an official Maven repo for the Facebook SDK:
Write all those variables values in "gradle.properties" file.
Like
You can follow this post https://stackoverflow.com/a/20221453/1232520
You can now get Facebook SDK with gradle: