Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Icon 组件报动态引用错误 #105

Open
silentzone opened this issue Jun 18, 2020 · 2 comments
Open

使用Icon 组件报动态引用错误 #105

silentzone opened this issue Jun 18, 2020 · 2 comments

Comments

@silentzone
Copy link

出现红屏 Error: Dynamic require defined at line 17; not supported by metro

是不是 nativecli 自带的 metro 版本低了?

react-native-cli: 2.0.1
react-native: 0.61.5
设备是小米mix2s 真机android9,和 android虚拟机 android10

@skylarklxlong
Copy link

@silentzone 你好我也遇到了这个问题,请问您是如何解决的

@skylarklxlong
Copy link

@silentzone 我找到了一种解决方案
将第一种写法改成下面第二种就可以正常了
1、<Icon style={{ marginLeft: 4 }} type='question-circle' size={14} tintColor={variables.mtdGrayLighter}></Icon>
2、<Icon style={{ marginLeft: 4 }} source={require('beeshell/dist/common/images/icons/question-circle.png')} size={14} tintColor={variables.mtdGrayLighter}></Icon>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants