I am building an Android game using LibGDX that needs to share achievements in Facebook. I followed this guide up to step 5. But when I tried step 6, I get an error on import com.facebook.FacebookSdk;
saying it 'cannot be resolved'.
build.gradle content:
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.facebook.android:facebook-android-sdk:4.7.0"
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
}
}
I am using Android Studio version 1.4. I found a number of similar questions in StackOverflow but none of them worked for me. What am I doing wrong here? Any help would be much appreciated.