React Native ships with its own version of Yoga which can cause conflicts when merging the dex files. In order to avoid this, you can instruct Gradle to exclude one of the Yoga modules.
To do this, add a section like this to your Gradle file after the dependency declaration:
For more information, check out issue #224.
If you want to override the version of the support library Litho requires, you can set
the overrides in your
If you are getting this error when running a Litho unit test, go through these steps:
- Ensure Java 8 is correctly set up. If you are on a Mac, make sure that
which javapoints to something like
/usr/bin/java. Otherwise, update your
- Make sure your tests use the
litho_robolectric4_testwhich sets up the necessary dependencies on the native libraries.
- If your tests use PowerMock, use the
litho_robolectric4_powermock_testor set the
per_testwhich ensures that class loaders aren't reused across threads.
- If everything else fails, reboot.
- Follow the instructions under Unit Testing - Caveats for your setup.
- Relaunch the gradle daemon with
@InjectProp fails for generated components#
When using parallel build systems like Buck, it can be difficult for the build
system to determine the correct order to generate sources in. This can lead to
essential type information being unavailable, making it impossible to determine
the fully qualified name. If a component A tries to use
another generated component B, this can fail if B is part of the same
compilation unit, but sits in a different package.
The easiest workaround for this is to help the compiler by moving either the referencing or the referenced component into a separate build module. Splitting build modules by package is considered a good practice with Buck.