简体   繁体   English

如何为成功构建解决':react-native-vector-icons'错误?

[英]How to resolve ':react-native-vector-icons' error for a successful build?

I am trying to build my react-native app but I am getting an error: 我正在尝试构建我的react-native应用程序,但我收到一个错误:

  • What went wrong: A problem occurred configuring project ':react-native-vector-icons'. 出了什么问题:配置项目':react-native-vector-icons'时出现问题。

  • Could not resolve all files for configuration ':react-native-vector-icons:classpath'. 无法解析所有配置文件':react-native-vector-icons:classpath'。

  • Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available. 无法找到com.android.tools.build:gradle:2.3.+的任何匹配项,因为没有com.android.tools.build:gradle版本可用。

I have tried the following commands: 我尝试了以下命令:

  • npm install npm安装
  • npm install npm -g npm install npm -g
  • npm rm --cached npm rm --cached
  • git clean -d -fx git clean -d -fx
  • npm cache clean --force npm cache clean --force
  • npm update npm更新
  • npm upgrade npm升级
  • npm audit fix npm审核修复
  • npm install react-native-vector-icons --save npm install react-native-vector-icons --save

I have tried everything I can find on how to resolve this but I cannot get this error to go away. 我已经尝试了一些我能找到的关于如何解决这个问题但我不能让这个错误消失。 Does anyone know how to resolve this react-native-vector-icons build fail error? 有谁知道如何解决这个react-native-vector-icons构建失败错误?

在此输入图像描述

You have to uninstall the react-native-vector-icons plugin first. 您必须先卸载react-native-vector-icons插件。 Then, reinstall it. 然后,重新安装它。 Just type: 只需输入:

$ npm uninstall react-native-vector-icons
$ npm install --save react-native-vector-icons

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM