我按照安装说明安装了这个库(https://github.com/stefalda/ReactNativeLocalization)
npm install react-native-localization --save
react-native link react-native-localization
我不想再使用它了。我已经尝试了以下步骤将其从我的项目中删除:
npm unlink react-native-localization
npm uninstall react-native-localization --save
我试着跑
react-native unlink react-native-localization
但是,我收到错误消息 react-native-localization is not a react-native library.
当我运行时react-native run-android,出现以下错误:
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.
第一次运行
react-native unlink libraryname
然后
npm uninstall libraryname
或使用 yarn
yarn remove libraryname
万一,如果它不起作用,那么
转到您的项目 android 目录并打开setting.gradle
并手动删除您的库配置。和
还要检查您的MainActivity.java以删除有关库的任何配置。
希望会有所帮助!!!
好吧,我找到了解决方案。您必须删除 Android 项目的 build.gradle 文件中的引用以及 MainApplication.java 类中的任何引用。然后它对我有用
| 归档时间: | 
 | 
| 查看次数: | 9043 次 | 
| 最近记录: |