Skip to content

Commit 4758454

Browse files
committed
docs: update troubleshooting to include transitive dependency section
1 parent 2f945cf commit 4758454

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

docs/docs/docs/guides/troubleshooting.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,30 @@ This is because RN 0.82.0 changed the path to which the JS bundle is written to
1010

1111
The brownfield Gradle plugin adds both directories to the source sets, potentially causing a conflict of artifacts. To fix this, just once clean your build directory (precisely, the `app/build/` directory) and rebuild the project. All subsequent builds should work fine.
1212

13+
## [Android] Transitive dependencies not being auto resolved
14+
15+
Installed third party packages like `react-native-screens` or others, may rely on transitive dependencies in their `build.gradle` file. These dependencies are not auto resolved by `brownfield-gradle-plugin`. This is an intended behavior in bare React Native apps.
16+
17+
For Expo apps, this should work out of the box.
18+
19+
To make it work with bare React Native Apps, you have two options:
20+
21+
#### Option 1:
22+
23+
Add those dependencies from `react-native-screens/build.gradle` to `yourbrownfieldmodule/build.gradle`:
24+
25+
```kts
26+
api("com.google.android.material:material:1.13.0")
27+
```
28+
29+
#### Option 2:
30+
31+
Add those dependencies from `react-native-screens/build.gradle` to `nativeapp/build.gradle`:
32+
33+
```kts
34+
implementation 'com.google.android.material:material:1.13.0'
35+
```
36+
1337
## [iOS] `No script URL provided` in Release configuration
1438

1539
If you encounter this error, most likely you have missed a setup step and are missing `ReactNativeBrownfield.shared.bundle = ReactNativeBundle` before your call to `startReactNative`.

0 commit comments

Comments
 (0)