Native Dependency Troubleshooting

If the Tyrads SDK is installed but you encounter errors like Native component for "BVLinearGradient" not found , it means the React Native Auto-linking process failed to pick up the native dependencies.

This is common in monorepos, local workspace links, or complex project structures. Follow these steps to manually link the required dependencies.


1. Required Dependencies

The Tyrads SDK relies on the following dependencies which should be installed in your host app:

  • react-native-linear-gradient (Native)

  • react-native-snap-carousel (JS)


2. Android Manual Linking

If you see BVLinearGradient not found on Android, perform these steps:

A. Update android/settings.gradle

Add the following lines to include the native projects:

include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')

B. Update android/app/build.gradle

Add the implementation lines to your dependencies block:

C. Update MainApplication.kt

Manually register the packages in your getPackages() method:


3. iOS Manual Linking

If you encounter issues on iOS, follow these steps:

A. Update ios/Podfile

Ensure the pods are explicitly listed if they aren't being picked up:

B. Run Pod Install

After updating the Podfile, navigate to the ios directory and run:


4. Rebuild the App

After making any native changes, you must perform a clean build:

Last updated