From 7d767e22fdf7777a7c307266f08cd8b4935ed4bd Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 13 Aug 2019 04:07:51 -0700 Subject: [PATCH] Document OkHttp3/Java8 build problems (#516) Summary: Fix https://github.com/facebook/flipper/issues/512 Pull Request resolved: https://github.com/facebook/flipper/pull/516 Reviewed By: danielbuechele Differential Revision: D16761610 Pulled By: passy fbshipit-source-id: 2fb4b756f0d1bc13fb307f2144b57c1a868b3281 --- docs/troubleshooting.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 119e1f622..dcaf2e419 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -53,3 +53,36 @@ The following devices are known to be incompatible or face issues with flipper: ### File an Issue Still not working? File an issue on [GitHub](https://github.com/facebook/flipper/issues) with the chrome DevTools logs and the output from the diagnostics screen, if relevant. + +## Android + +Build error after including the Flipper dependency: + +``` +Exception from call site #4 bootstrap method +``` + +This can happen because we include [OkHttp3](https://github.com/square/okhttp/issues/4597#issuecomment-461204144) as dependency which makes use of Java 8 features. There are two ways of dealing with this: + +**Enable Java 8 support** + +Add this to your Gradle config: + +```groovy +android { + compileOptions { + targetCompatibility = "8" + sourceCompatibility = "8" + } + } + ``` + + **Exclude the OkHttp3 dependency** + + Alternatively, if you don't plan on making use of OkHttp, you can exclude the dependency from the build entirely: + + ``` +debugImplementation('com.facebook.flipper:flipper:*') { + exclude group: 'com.squareup.okhttp3' +} +```