加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native SVG – (iOS)不变违规:“RNSVGSvgView”的原生组

发布时间:2020-12-15 05:07:53 所属栏目:百科 来源:网络整理
导读:我在iOS模拟器上运行的React Native的SVG库存在问题. "dependencies": { "better-fetch": "^1.1.2","firebase": "^4.8.1","lodash": "^4.17.4","react": "16.0.0","react-native": "0.51.0","react-native-svg": "^6.0.1-rc.1","react-redux": "^5.0.6","red
我在iOS模拟器上运行的React Native的SVG库存在问题.

"dependencies": { 
     "better-fetch": "^1.1.2","firebase": "^4.8.1","lodash": "^4.17.4","react": "16.0.0","react-native": "0.51.0","react-native-svg": "^6.0.1-rc.1","react-redux": "^5.0.6","redux": "^3.7.2","redux-logger": "^3.0.6","redux-thunk": "^2.2.0" 
}

我试过以下无济于事:

npm install react-native-svg --save //(again)
react-native link react-native-svg //(again)
watchman watch-del-all
rm -rf node_modules/ && yarn cache clean && yarn install

图像显然表明问题出在链接中.因此,如果自动链接不适合您,则可以尝试手动链接. IOS设备缺少手动链接指南;但是,IOS缺少它.

但您可以按照以下步骤在IOS上手动链接:

>在XCode中打开您的项目
>转到… / node_modules / react-native-svg / ios
>找到文件RNSVG.xcodeproj并将其拖动到XCode中显示的库目录中.
>展开刚刚添加的文件(RNSVG.xcodeproj),直到看到libRNSVG.a,它位于RNSVG.xcodeproj>产品)
>将libRNSVG.a拖到Link Binary With Libraries部分(位于Build Phase中,可以在XCode窗口的顶部找到)

现在你很高兴去:)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读