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
This commit is contained in:
Pascal Hartig
2019-08-13 04:07:51 -07:00
committed by Facebook Github Bot
parent 9a513ebd99
commit 7d767e22fd

View File

@@ -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'
}
```