Closed mustafaskyer closed 1 year ago
Hello, any update on this! thanks 🙏
Hi, I finally found workaround for this. Remove the node_modules
directory in the root of your monorepo, and also symlink in your react native root directory. Then, create empty node_modules
directory in your react native root directory and create symlink of the directory in the root of your monorepo.
Then install the packages.
Somehow it seems gradle can't resolve symlink directory, so we have to invert the symlink and original node_modules directory each other.
(Only use this solution when syncing gradle with Android Studio)
I found another workaround for this but I don't know whether it's better or worse than that from @wjaykim...
I updated all node_module paths in gradle files to point to the workspace root node_modules folder. Now I can successfully run gradle sync from Android Studio.
I am also facing this issue. not sure if i should update the node_modules path in gradle files
Hi there - I am also experiencing this issue. Interestingly enough, it runs fine on Android Studio Bumblebee, but not on the latest Dolphin release.
For now I have also manually set the paths to point to the root as @david-gettins suggests. It was the quicker fix. Problem does seem related to the symlinks tho.
On a more experimental note, it seems like the issue is related to react-native-gradle-plugin
If you uncomment the includeBuild expression on settings.gradle and also the classpath on build.gradle, the sync completes properly.
Finally found hint from suggestions of @esfxra and @david-gettins .
The only thing to do is in your app settings.gradle, change the react-native-gradle-plugin
's directory.
+ includeBuild('../../../node_modules/react-native-gradle-plugin')
- includeBuild('../node_modules/react-native-gradle-plugin')
@wjaykim Thanks a lot...worked for us
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Can not build app in android studio
Expected Behavior
Expected app to build and run normally without any issues
Steps to Reproduce
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment