警告:" BVLinearGradient"的本机组件不存在

时间:2017-03-29 23:49:27

标签: react-native linear-gradients

我试图实现react-native-linear-gradient但是一旦我将库导入到react-native组件中,我就会收到以下错误:

{
  "gifts" : {
    "\"93c08520-14ea-11e7-855f-e957e315db04\"" : {
      "Description" : "SomeDescription",
      "Name" : "Some GIFT",
      "Tags" : [ "wedding", "graduation", "Easter" ],
      "id" : "93c08520-14ea-11e7-855f-e957e315db04"
    },
    "\"93d48250-14ea-11e7-855f-e957e315db04\"" : {
      "Description" : "SomeDescription",
      "Name" : "Some GIFT",
      "Tags" : [ "birthday", "graduation", "anniversary" ],
      "id" : "93d48250-14ea-11e7-855f-e957e315db04"
    },
    "\"93e487e0-14ea-11e7-855f-e957e315db04\"" : {
      "Description" : "SomeDescription",
      "Name" : "Some GIFT",
      "Tags" : [ "graduation", "wedding", "birthday" ],
      "id" : "93e487e0-14ea-11e7-855f-e957e315db04"
    }
}

enter image description here

我可以在XCode中成功编译项目,并且渐变显示在物理iPhone上,但它不在模拟器中。

之前有没有人处理过这个问题?

同样,问题是本机反应(iOS模拟器)无法找到库,但是XL中存在BVLinearGradient库,项目编译成功。

enter image description here

由于

1 个答案:

答案 0 :(得分:0)

我看到您正在使用RN 0.6.x,因此您不必链接。您应该走iOS方向并运行此命令。

"pod install"

对于README,您应该仔细阅读iOS integration的线性梯度。