【发布时间】:2018-09-15 08:55:27
【问题描述】:
我在尝试运行我的 IOS 项目时遇到两个错误。 第一个位于模拟器屏幕上,上面写着: 不变违规:“RCTImageView”的本机组件不存在
这是我在控制台中的错误:ExceptionsManager.js:65 Invariant Violation: View config not found for name RCTImageView
问题是我的 RCTImage 位于 Podfile 中,但是 我在我的节点模块中找不到 RCTImageView,因此我可以将其移动到 Xcode 并手动链接该库。
有人对此有某种解决方案吗?
它说它位于下面的组件内部:
/**
* A single button as displayed on the main menu
*/
export default class ClockComponent extends Component {
handlePress() {
this.props.onPress();
}
render() {
return (
<NavigationTouch
onPress={() => this.handlePress()}
style={Style.mainMenuElementContainer}
>
<View style={[Style.mainMenuElement, this.props.colorStyle]}>
<Image source={this.props.icon} style={Style.mainMenuElementIcon} resizeMode="contain" />
<Text
style={Style.text}
minimumFontScale={0.9}
numberOfLines={3}
>
{this.props.title}
</Text>
</View>
</NavigationTouch>
);
}
}
【问题讨论】:
标签: xcode react-native cocoapods