Here’s how to add Fresco to your Android project.

Android Studio or Gradle

Edit your build.gradle file. You must add the following line to the dependencies section:

1
2
3
4
dependencies {
  // your app's other dependencies
  compile 'com.facebook.fresco:fresco:0.12.0'
}

The following optional modules may also be added, depending on the needs of your app.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
dependencies {
  // If your app supports Android versions before Ice Cream Sandwich (API level 14)
  compile 'com.facebook.fresco:animated-base-support:0.12.0'

  // For animated GIF support
  compile 'com.facebook.fresco:animated-gif:0.12.0'

  // For WebP support, including animated WebP
  compile 'com.facebook.fresco:animated-webp:0.12.0'
  compile 'com.facebook.fresco:webpsupport:0.12.0'

  // For WebP support, without animations
  compile 'com.facebook.fresco:webpsupport:0.12.0'
}

Eclipse ADT

Download the zip file.

When you expand it, it will create a directory called ‘frescolib’. Note the location of this directory.

  1. From the File menu, choose Import.
  2. Expand Android, select “Existing Android Code into Workspace”, and click Next.
  3. Click Browse, navigate to the frescolib directory, and click OK.
  4. A number of projects should be added. Make sure that at least the following are checked: drawee, fbcore, fresco, imagepipeline, imagepipeline-base. The others are optional depending on your app’s needs similar to the breakdown above for Gradle.
  5. Right-click (Ctrl-click on Mac) on your project and choose Properties, then click Android.
  6. Click the Add button in the bottom right, select Fresco, and click OK, then click OK again.

You should now be able to build your app with Fresco.

If you want to use OkHttp as the network layer, see the separate instructions.

If you get a Jar Mismatch warning about android-support-v4.jar, delete the one in frescolib/imagepipeline/libs.

Edit on GitHub