To set up Flipper for Android, you need to add the neccessary dependencies to your app, initialize the Flipper client and enable the plugins you want to use. Optionally, you can hook up the diagnostics Activity to help you troubleshoot connection issues.
Flipper is distributed via JCenter. Add the dependencies to your
You should also explicitly depend on
instead of relying on transitive dependency resolution which is getting deprecated
with Gradle 5.
We provide a "no-op" implementation of some oft-used Flipper interfaces you can use to make it easier to strip Flipper from your release builds.
Please note that our
flipper-noop package provides a limited subset of the
APIs provided by the
flipper package and does not provide any plugin stubs.
It is recommended that you keep all Flipper instantiation code in a separate
build variant to ensure it doesn't accidentally make it into your production
builds. Check out the sample
see how to organise your Flipper initialization into debug and release
Alternatively, have a look at the third-party flipper-android-no-op repository, which provides empty implementations for several Flipper plugins.
Now you can initialize Flipper in your Application's
onCreate method, which involves
initializing SoLoader (for loading the C++ part of Flipper) and starting a
It's recommended that you add the following activity to the manifest, which can help diagnose integration issues and other problems:
Feeling adventurous? We publish Android snapshot releases directly off of
You can get the latest version by adding the Maven Snapshot repository to your sources
and pointing to the most recent
Finally, you need to add plugins to your Flipper client. Above, we have only added the Layout Inspector plugin to get you started. See Network Plugin and Layout Inspector Plugin for information on how to add them, and also enable Litho or ComponentKit support. You can check the sample apps in the GitHub repo for examples of integrating other plugins.
See the troubleshooting page for help with known problems.