Error importing to facebook sdk

I had a facebook skd download import it into my eclipse add v4 jar file and change complier to 1.6, but still it gives me an error in the FacebookAppLinkResolver class

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

enter image description here above are not imported

+6
source share
5 answers

1. Open the project properties

2. Select "Java Build Path" in the menu on the left.

3. Select the "Libraries" tab

4. Click "Add External Bank"

5. FIRST IMPORTANT STEPS: - Select the β€œbolts” file in the β€œlibs” folder of YOUR CURRENT PLACE FOR THE PROJECT (the path should be | your project, not the android sdk).

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

+9
source

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

+8
source

Or, if you use 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 do not need to add this manually. To enable 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 the latest version of Bolts here .

+6
source

The answer to amalBit works fine for Eclipse. Here is the equivalent of Android Studio. I encountered this error after updating to the latest version of the Android SDK.

  • File β†’
  • Project Structure β†’
  • Select the Facebook module on the left.
  • Select the Dependencies Tab
  • Click the + button at the bottom of the Window
  • Select File Dependency
  • In the libs folder, you should see the bolts.jar file that you copied when updating the SDK.
  • Select bolts.jar and click OK
  • Then click "Apply" and "OK"

Running Gradle Sync (happened automatically for me) should fix the error.

0
source

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

So, I think that the Android studio was not able to import the libraries as a directory, but instead included the libs file with "../libs" in it. Not sure if this is a problem with facebook-sdk, a problem with git cloning, or a problem with an Android site.

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

0
source

All Articles