java - Error in importing facebook SDK -


i using android studio version 1.2 , going use facebook sdk create application allow user post in wall. when import module or facebook sdk getting error.

error:(15, 0) not find property 'android_build_sdk_version' on project ':facebook'.

my downloaded sdk latest one. name of zip file when downloaded. facebook-android-sdk-4.4.1

this build.gradle have.

apply plugin: 'com.android.application'  android {     compilesdkversion 22     buildtoolsversion "23.0.0 rc3"      defaultconfig {         applicationid "com.example.jerex.facebook"         minsdkversion 14         targetsdkversion 22         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } } repositories { mavencentral() } dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.2.1'     compile 'com.facebook.android:facebook-android-sdk:4.1.0' } 

this build.gradle

// top-level build file can add configuration options common sub-projects/modules.  buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:1.2.2'          // note: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()     } } 

i not put codes yet because implementing facebook sdk keep on having error. thats why cannot start working code

just add code in facebook\build.gradle find gradle , change code

android { compilesdkversion integer.parseint(project.android_build_sdk_version) buildtoolsversion project.android_build_tools_version  defaultconfig {     minsdkversion 8     targetsdkversion integer.parseint(project.android_build_target_sdk_version) } 

to code.

android {     compilesdkversion 19     buildtoolsversion '19.1.0'      defaultconfig {         minsdkversion 15         targetsdkversion 19     } 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -