NEW troubleshooting section (SetUp)
Summary: Restyle of Trobleshooting, which involved changes to sidebar.js and splitting up the previous troubleshooting page into five separate pages. Reviewed By: lblasa Differential Revision: D36282539 fbshipit-source-id: e60834e2b4d98b70b23bb11309c3438d85e4de0e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6cdda85ec9
commit
0b16f3a031
63
docs/getting-started/troubleshooting/android.mdx
Normal file
63
docs/getting-started/troubleshooting/android.mdx
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
id: android
|
||||
title: Troubleshooting Android Issues
|
||||
sidebar_label: Android Issues
|
||||
custom_edit_url: https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/sonar/docs/android.mdx
|
||||
---
|
||||
|
||||
Flipper is a work in progress and issues may occur. This page contains known issues associated with the Android platform and provides steps you can take to try to resolve them.
|
||||
|
||||
## Exception from call site #4 bootstrap method
|
||||
|
||||
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'
|
||||
}
|
||||
```
|
||||
|
||||
## Duplicate class `com.facebook.jni.*`
|
||||
|
||||
This can occur when mixing different versions of [FBJNI](https://github.com/facebookincubator/fbjni),
|
||||
a library we use to interact with native C++ code.
|
||||
|
||||
Speficially, this can happen when the versions `0.0.x` and `0.1.x` are mixed. Version `0.1.0` of FBJNI
|
||||
switched to using [Google Prefab](https://google.github.io/prefab/) for distributing native artifacts,
|
||||
which made the split into combined, "java-only" and "header" packages redundant and only requires
|
||||
a single dependency in your projects.
|
||||
|
||||
When including both "fbjni-java-only:0.0.1" and "fbjni:0.1.0" in one project, you will now
|
||||
duplicate class errors during the build process. You must ensure that only one of the two
|
||||
versions is used in your entire dependency tree. Start by looking at `./gradlew :myapp:dependencies`
|
||||
to see where the different version requirements come from. Then exclude the FBJNI dependency from
|
||||
one of them, e.g.
|
||||
|
||||
```groovy
|
||||
implementation("com.facebook.react:react-native:+") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user