Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unlink library from react-native project

Tags:

react-native

I installed this library (https://github.com/stefalda/ReactNativeLocalization) following the installation instructions

npm install react-native-localization --save
react-native link react-native-localization

and I don't want to use it anymore. I already tried the following steps to remove it from my project:

npm unlink react-native-localization
npm uninstall react-native-localization --save

I tried to run

react-native unlink react-native-localization

However, I get the error message that react-native-localization is not a react-native library.

When I run react-native run-android I get the following error:

Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve project :react-native-localization.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-localization:
          - None of the consumable configurations have attributes.
like image 924
Yoey Avatar asked Jul 05 '19 21:07

Yoey


People also ask

How do I unlink a react-native library?

Try the following: rnpm unlink react-native-image-crop-picker from root project directory. Manually install react-native-image-crop-picker for iOS using these instructions (make sure you do the pod install step) Manually install react-native-image-crop-picker for Android using these instructions.

How do you delete a react-native project?

When you create a new React project, all the project files are stored inside a project directory. To delete React app, just simply delete this directory. If you get any errors during this process, try to use the terminal instead of file explorer.


1 Answers

First run

react-native unlink libraryname

then

npm uninstall libraryname

or using yarn

yarn remove libraryname

In case, if it's not working then

Go to your project android directory and open setting.gradle

and remove your library configration manualy. and

also check your MainActivity.java to remove any configration about library.

Hope it will help!!!

like image 105
Muhammad Ashfaq Avatar answered Sep 22 '22 11:09

Muhammad Ashfaq