Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'ANDROID_BUILD_SDK_VERSION' Error with Facebook SDK

I'm consistenly getting the same error on HelloFacebookSample when importing Facebook SDK.

Error:(8, 0) Could not find property 'ANDROID_BUILD_SDK_VERSION' on project ':HelloFacebookSample'.

I know the error is regarding the HelloFacebookSample, and I've tried to assign 'ANDROID_BUILD_SDK_VERSION' = 20 (MY SDK VERSION). It still shoots the same error.

Here is a snapshot

enter image description here

This error is sucking the life out of me. How can I get rid of this error?

like image 337
user3289740 Avatar asked Feb 11 '23 07:02

user3289740


2 Answers

Facebook's "build.gradle" file assumes that you have a "gradle.properties" file where the ANDROID_BUILD_SDK_VERSION variable is declared. So all you have to do is create a file called "gradle.properties" in the root level and add the following to it.

ANDROID_BUILD_TARGET_SDK_VERSION=19 ANDROID_BUILD_TOOLS_VERSION=10.0.0 ANDROID_BUILD_SDK_VERSION=19 ANDROID_BUILD_MIN_SDK_VERSION=11

like image 162
Vardhan Avatar answered Feb 13 '23 21:02

Vardhan


You have this error because you did not replace 'ANDROID_BUILD_SDK_VERSION' by 20 in HelloFacebookSample/build.gradle, not in Facebook/build.gradle.

like image 29
anil Avatar answered Feb 13 '23 20:02

anil