Skip to content

Android build times are very slow #25501

@AndrewGable

Description

@AndrewGable

Problem

If you run npm run android the build time is very very slow. This is because we are required to build React Native from source to support two patches:

We have two patch files which implement/fix things on Android side, NumberOfLines.patch and VerticalScrollBarPosition.patch. When we have Android patches, it’s necessary to build from source to ensure these patches take effect in the application.

NumberOfLines.patch
Related to these PRs: facebook/react-native#35703 and facebook/react-native#38021
It’s necessary to fix this issue: #19809

VerticalScrollBarPosition.patch
Related to these PRs: facebook/react-native#38071 and facebook/react-native#38073
It’s necessary to fix this issue: #11321

VerticalScrollBarPosition.patch is merged and are available in RN 0.72.4 🎉 -> https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v0724. Once we update to this version or higher we can remove this patch.

Here’s more info about all the PRs we have and current state: #18507 (comment)

Solution

  1. Get NumberOfLines.patch merged and deployed
  2. Update to a version of React Native containing both patches which prevents needing from building from source.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions