Before submitting a new issue
Bug Summary
Title: Android autolinking broken in 3.10.1: self-referential dependencies block in react-native.config.js excludes the package
Environment
@lodev09/react-native-true-sheet: 3.10.1
React Native: 0.85.2
New Architecture (Fabric): enabled (newArchEnabled=true)
Hermes: enabled
@react-native-community/cli: 20.1.0
Platform: Android (iOS works fine)
Summary
On a fresh install with newArchEnabled=true, Android throws LINKING_ERROR at runtime even after a full clean rebuild:
TypeError: Cannot read property 'TrueSheetProvider' of undefined
Error: The package '@lodev09/react-native-true-sheet' doesn't seem to be linked.
All three conditions in the error message are satisfied. iOS works.
Root cause
The package's published react-native.config.js is:
module.exports = {
dependency: {
platforms: {
ios: {},
android: {
componentDescriptors: ['TrueSheetViewComponentDescriptor'],
cmakeListsPath: '../android/src/main/jni/CMakeLists.txt',
},
},
},
dependencies: {
'@lodev09/react-native-true-sheet': {
platforms: {
ios: {
configurations: ['Debug', 'Release'],
},
},
},
},
};
The top-level dependency (singular) key correctly declares the Android Fabric component. The dependencies (plural) block, however, contains a self-referential override for @lodev09/react-native-true-sheet that only specifies an ios platform key. The RN CLI merges this override on top of the package's own config and effectively wipes out the Android platform entry.
Confirmed by inspecting android/build/generated/autolinking/autolinking.json after a clean build — every other Fabric library in the project (screens, reanimated, gesture-handler, …) is present, but @lodev09/react-native-true-sheet is completely absent. Because the package never makes it into PackageList.java, TrueSheetModule is never registered.
The dependencies block looks like it was meant for a monorepo root config (e.g. an example/ workspace) and got accidentally published to the npm package.
Reproduction
Bare RN 0.85 app with newArchEnabled=true.
yarn add @lodev09/react-native-true-sheet
Add a somewhere.
cd android && ./gradlew clean && cd .. && yarn android
Result: runtime LINKING_ERROR on Android.
Workaround
Override in the app's react-native.config.js:
const path = require('path');
module.exports = {
dependencies: {
'@lodev09/react-native-true-sheet': {
platforms: {
android: {
componentDescriptors: ['TrueSheetViewComponentDescriptor'],
cmakeListsPath: path.resolve(
__dirname,
'node_modules/@lodev09/react-native-true-sheet/android/src/main/jni/CMakeLists.txt'
),
},
},
},
},
};
Note: cmakeListsPath must be absolute here — when supplied via an app-level dependencies override, the CLI does not resolve it through sourceDir the way it does for a package's own dependency config, so the relative '../android/src/main/jni/CMakeLists.txt' from the package config gets written verbatim into Android-autolinking.cmake and CMake fails with add_subdirectory given source ... which is not an existing directory.
Then nuke android/build/generated/autolinking, android/app/build/generated/autolinking, and android/app/.cxx (these are NOT cleared by ./gradlew clean) and rebuild.
Suggested fix
Remove the entire dependencies block from the published react-native.config.js. The dependency (singular) key is the correct mechanism for a library to declare its own native config, and the existing one is already correct. With the dependencies override removed, Android autolinking will work without any consumer-side workaround.
If the configurations: ['Debug', 'Release'] constraint on iOS is intentional, it should move into dependency.platforms.ios instead.
Happy to send a PR.
Affected Platforms
Library Version
3.10.1
Environment Info
System:
OS: macOS 26.4.1
CPU: (14) arm64 Apple M4 Pro
Memory: 805.69 MB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.22.2
path: /opt/homebrew/bin/node
Yarn:
version: 4.4.0
path: /opt/homebrew/bin/yarn
npm:
version: 10.9.7
path: /opt/homebrew/bin/npm
Watchman:
version: 2026.04.20.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.2
- iOS 26.2
- macOS 26.2
- tvOS 26.2
- visionOS 26.2
- watchOS 26.2
Android SDK:
API Levels:
- "35"
- "36"
Build Tools:
- 34.0.0
- 35.0.0
- 36.0.0
- 36.1.0
System Images:
- android-36.1 | Google Play ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
- android-37.0 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.3 AI-253.31033.145.2533.15113396
Xcode:
version: 26.3/17C529
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.18
path: /usr/bin/javac
Ruby:
version: 3.3.10
path: /Users/toshcode/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.1.0
wanted: 20.1.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.85.2
wanted: 0.85.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Steps to Reproduce
Bare RN 0.85 app with newArchEnabled=true.
yarn add @lodev09/react-native-true-sheet
Add a somewhere.
cd android && ./gradlew clean && cd .. && yarn android
Result: runtime LINKING_ERROR on Android.
Repro
https://github.com/lodev09/react-native-true-sheet/blob/main/react-native.config.js
Additional Context
No response
Before submitting a new issue
Bug Summary
Title: Android autolinking broken in 3.10.1: self-referential dependencies block in react-native.config.js excludes the package
Environment
@lodev09/react-native-true-sheet: 3.10.1
React Native: 0.85.2
New Architecture (Fabric): enabled (newArchEnabled=true)
Hermes: enabled
@react-native-community/cli: 20.1.0
Platform: Android (iOS works fine)
Summary
On a fresh install with newArchEnabled=true, Android throws LINKING_ERROR at runtime even after a full clean rebuild:
TypeError: Cannot read property 'TrueSheetProvider' of undefined
Error: The package '@lodev09/react-native-true-sheet' doesn't seem to be linked.
All three conditions in the error message are satisfied. iOS works.
Root cause
The package's published react-native.config.js is:
module.exports = {
dependency: {
platforms: {
ios: {},
android: {
componentDescriptors: ['TrueSheetViewComponentDescriptor'],
cmakeListsPath: '../android/src/main/jni/CMakeLists.txt',
},
},
},
dependencies: {
'@lodev09/react-native-true-sheet': {
platforms: {
ios: {
configurations: ['Debug', 'Release'],
},
},
},
},
};
The top-level dependency (singular) key correctly declares the Android Fabric component. The dependencies (plural) block, however, contains a self-referential override for @lodev09/react-native-true-sheet that only specifies an ios platform key. The RN CLI merges this override on top of the package's own config and effectively wipes out the Android platform entry.
Confirmed by inspecting android/build/generated/autolinking/autolinking.json after a clean build — every other Fabric library in the project (screens, reanimated, gesture-handler, …) is present, but @lodev09/react-native-true-sheet is completely absent. Because the package never makes it into PackageList.java, TrueSheetModule is never registered.
The dependencies block looks like it was meant for a monorepo root config (e.g. an example/ workspace) and got accidentally published to the npm package.
Reproduction
Bare RN 0.85 app with newArchEnabled=true.
yarn add @lodev09/react-native-true-sheet
Add a somewhere.
cd android && ./gradlew clean && cd .. && yarn android
Result: runtime LINKING_ERROR on Android.
Workaround
Override in the app's react-native.config.js:
const path = require('path');
module.exports = {
dependencies: {
'@lodev09/react-native-true-sheet': {
platforms: {
android: {
componentDescriptors: ['TrueSheetViewComponentDescriptor'],
cmakeListsPath: path.resolve(
__dirname,
'node_modules/@lodev09/react-native-true-sheet/android/src/main/jni/CMakeLists.txt'
),
},
},
},
},
};
Note: cmakeListsPath must be absolute here — when supplied via an app-level dependencies override, the CLI does not resolve it through sourceDir the way it does for a package's own dependency config, so the relative '../android/src/main/jni/CMakeLists.txt' from the package config gets written verbatim into Android-autolinking.cmake and CMake fails with add_subdirectory given source ... which is not an existing directory.
Then nuke android/build/generated/autolinking, android/app/build/generated/autolinking, and android/app/.cxx (these are NOT cleared by ./gradlew clean) and rebuild.
Suggested fix
Remove the entire dependencies block from the published react-native.config.js. The dependency (singular) key is the correct mechanism for a library to declare its own native config, and the existing one is already correct. With the dependencies override removed, Android autolinking will work without any consumer-side workaround.
If the configurations: ['Debug', 'Release'] constraint on iOS is intentional, it should move into dependency.platforms.ios instead.
Happy to send a PR.
Affected Platforms
Library Version
3.10.1
Environment Info
System: OS: macOS 26.4.1 CPU: (14) arm64 Apple M4 Pro Memory: 805.69 MB / 48.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 22.22.2 path: /opt/homebrew/bin/node Yarn: version: 4.4.0 path: /opt/homebrew/bin/yarn npm: version: 10.9.7 path: /opt/homebrew/bin/npm Watchman: version: 2026.04.20.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.16.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 25.2 - iOS 26.2 - macOS 26.2 - tvOS 26.2 - visionOS 26.2 - watchOS 26.2 Android SDK: API Levels: - "35" - "36" Build Tools: - 34.0.0 - 35.0.0 - 36.0.0 - 36.1.0 System Images: - android-36.1 | Google Play ARM 64 v8a - android-36 | Google Play ARM 64 v8a - android-37.0 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2025.3 AI-253.31033.145.2533.15113396 Xcode: version: 26.3/17C529 path: /usr/bin/xcodebuild Languages: Java: version: 17.0.18 path: /usr/bin/javac Ruby: version: 3.3.10 path: /Users/toshcode/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": installed: 20.1.0 wanted: 20.1.0 react: installed: 19.2.3 wanted: 19.2.3 react-native: installed: 0.85.2 wanted: 0.85.2 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: trueSteps to Reproduce
Bare RN 0.85 app with newArchEnabled=true.
yarn add @lodev09/react-native-true-sheet
Add a somewhere.
cd android && ./gradlew clean && cd .. && yarn android
Result: runtime LINKING_ERROR on Android.
Repro
https://github.com/lodev09/react-native-true-sheet/blob/main/react-native.config.js
Additional Context
No response