# 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:

```gradle
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:

```gradle
dependencies {
    // ... other dependencies
    implementation project(':react-native-linear-gradient')
}
```

#### C. Update `MainApplication.kt`

Manually register the packages in your `getPackages()` method:

```kotlin
import com.BV.LinearGradient.LinearGradientPackage

// ...

override fun getPackages(): List<ReactPackage> =
    PackageList(this).packages.apply {
        // Packages that cannot be autolinked yet can be added manually here
        add(LinearGradientPackage())
    }
```

***

### 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:

```ruby
target 'YourAppName' do
  # ... other pods
  pod 'react-native-linear-gradient', :path => '../node_modules/react-native-linear-gradient'
end
```

#### B. Run Pod Install

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

```bash
pod install
```

***

### 4. Rebuild the App

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

```bash
# Android
yarn android

# iOS
yarn ios
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk-doc.tyrads.com/react-native/native-dependency-troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
