Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

oscar gonzalez
oscar gonzalez
7,072 Points

How can i add a Facebook log in on android studio 1.1,

Hi Friends, I downloaded the Facebook sdk, i want to add the Facebook button in my App and then make the log in, someone to can help me and tell me step by step how used, I'd like to know how my user can register using the Facebook Sdk,!!!

3 Answers

Harry James
Harry James
14,780 Points

Hey again Oscar!

If you're getting the ANDROID_BUILD_MIN_SDK_VERSION error, it means you haven't defined the MIN_SDK_VERSION property in your build.gradle file! Make sure you have this line in your gradle.properties file:

ANDROID_BUILD_MIN_SDK_VERSION=16

You can change the 16 to any SDK version of your choice, I chose 16 due to its high ranking on the Android Developer Dashboard however, this may not suit your project.

Hope it helps and, if you have any more questions, give me a shout :)

Harry James
Harry James
14,780 Points

Hey Oscar!

Take a look at this page on the Facebook Developers site - it explains how you add a login button perfectly! There's a lot on the page but, just follow along with it - it's mainly copying and pasting but, you don't have to copy everything on the page, it depends what you want your app to do.

Hopefully this should help you out but, if there's still something you don't understand, give me a shout :)

oscar gonzalez
oscar gonzalez
7,072 Points

hello Harry thanks for your response, I already look this page, i followed this steps but I did not get good results, I was looking on internet but equals no answer for this, the post to I found show me but in old android studio version if you can help me could be great, i tried to add facebook module to my app but i got two errors Error:(19, 0) Could not find property 'ANDROID_BUILD_MIN_SDK_VERSION' on project ':facebook'. Error:(118, 0) Cannot call getBootClasspath() before setTargetInfo() is called.

please help me