CoronaPintu
CoronaPintu

Reputation: 1875

Android facebook sdk import error

i had download facebook skd import it in my eclipse add v4 jar file and change complier to 1.6 but yet it give me error in class FacebookAppLinkResolver

import bolts.AppLink; import bolts.AppLinkResolver; import bolts.Continuation; import bolts.Task;

enter image description here above are not import

Upvotes: 7

Views: 13395

Answers (5)

Will Calderwood
Will Calderwood

Reputation: 4636

Or if you're using Gradle you can add this to your Gradle file:

dependencies {
    compile 'com.parse.bolts:bolts-android:1.1.3'
}

Facebook is also available so you don't have to add that manually either. To include both use the following:

dependencies {
    compile 'com.facebook.android:facebook-android-sdk:4.5.0'
    compile 'com.parse.bolts:bolts-android:1.1.3'
}

You can check for the latest version of Bolts here.

Upvotes: 7

pseudozach
pseudozach

Reputation: 416

I had the same problem. Check your facebook-sdk/facebook folder to see if there is a libs file (Not directory)

So I think Android studio failed to import the libs as a directory instead included a libs file with "../libs" in it. Not sure if this was facebook-sdk issue, git cloning issue or android studio issue.

Solution:
1. remove the dummy libs file
2. copy the libs directory manually
3. remove the dependency in project structure
4. add it manually by clicking + sign

Upvotes: 0

Sebastian Gallese
Sebastian Gallese

Reputation: 302

amalBit's answer works great for Eclipse. Here is the Android Studio equivalent. I encountered this error after updating to the latest Facebook SDK for Android.

  1. File ->
  2. Project Structure ->
  3. Select the Facebook module on the left
  4. Select the Dependencies tab
  5. Press the + button at the bottom of the window
  6. Select File Dependency
  7. In the libs folder, you should see the bolts.jar file you copied over when updating the SDK.
  8. Select the bolts.jar file and press OK
  9. Then press Apply and OK

Doing a Gradle Sync (happened automatically for me) should resolve the error.

Upvotes: 0

user3664621
user3664621

Reputation: 99

1.Open your project properties

2.Select "Java Build Path" from left side menu

3.Select "Libraries" tab

4.Press "Add External Jar"

5.MOST IMPORTANT STEPS :- Select "bolts" jar file of "libs" folder of YOUR CURRENT PROJECT LOCATION(Path Should be
of your project only and not the android sdk).

6.Select "Order and Export" tab and "TICK" the checkbox of "android-support-v4.jar"

Upvotes: 9

Pratyesh
Pratyesh

Reputation: 696

Download sdk for Bolts library from https://github.com/BoltsFramework/Bolts-Android and add this project with facebook sdk project.

Upvotes: 8

Related Questions