Autolinking task from example app fails, after adding codegen config to example app. #825
Open
1 of 2 tasks
Labels
bug
Something isn't working
Description
Hi,
Android only, I have no idea about iOS
I tried to add a TurboModule to the example app. This TurboModule is only needed for the example app, so I added it to the example app only, not to the library itself. Adding TurboModules and FabricViews to the library worked without problems
For this I added a
codegenConfig
entry to./example/package.json
, adjustedcodegenConfig.name
,codegenConfig.android.javaPackageName
. And added a./example/src/NativeExample.ts
module. And tried to start the example app, so that codegen can generate some code and I can start to build the module in java/kotlin.The app didn't start (expected because the java side module didn't implement the methods yet). But the error was with autolinking:
Full error:
Thats not the problem: The package name is
react-native-mapsforge-vtm
, and the directory isreact-native-mapsforge-vtm-new-arch
That part is super weird:
build.gradle' line: 54
is:I went back in git history to a state were I know its stable. But the example app won't start anymore. Same error.
I tried to delete some generated code:
rm yarn.lock; rm -rf node_modules/; rm -rf example/node_modules; rm -rf android/generated; rm -rf example/android/generated rm -rf example/android/.gradle; rm -rf android/.gradle; rm -rf example/android/.idea; yarn cache clean; yarn install
But still. the example app won't start, and the error is the same.
I navigated to another directory and cloned the project from git. But even there, I get the same error when I try to start the example app. This commit should work: https://github.com/jhotadhari/react-native-mapsforge-vtm-new-arch/tree/bd0cdca7cb43409ecba7922cb00b9b0de83ba498
I tried to install
react-native-clean-project
in the root and in the example. But it doesn't help.It seems there is something cached outside of the repository, but I just can't find it.
I had the same issue some days ago. After installing https://www.npmjs.com/package/react-native-hardwarekey-event as a dependency for a library.
After searching hours for the source of the error, I started a new project and copied the files over.
Packages
Selected options
Link to repro
https://github.com/jhotadhari/react-native-mapsforge-vtm-new-arch
Environment
The text was updated successfully, but these errors were encountered: