Now that React Native has auto-linking, do we still need to use `react-native unlink` to unlink?

1.8k Views Asked by At

Now that React Native includes auto-linking, we no longer have to use react-native link. If we want to remove a library, we do npm uninstall <lib>, but do we still have to do react-native unlink <lib> as before, or how do we remove the code added to files like build.gradle?

UPDATE

Based on one of the responses, I tried running npm uninstall <lib>; cd android; gradlew cleanBuildCache;, but there are still many references to the <lib> in the android/build folder. This is causing problems because when I try to install another library, it's throwing conflict errors with the leftover references to <lib>.

Does anyone know what exactly gradelw cleanBuildCache does, and if there's any other command that will completely undo everything that happened from running npm install <lib>?

1

There are 1 best solutions below

1
Aurangzaib Rana On

just clean your gradle and rebuild your project

cd android 
./gradlew cleanBuildCache

then rebuild project again

if using Android studio then just Invalidate Caches