我正在尝试修改 react native boilerplate以便我可以在 Android 平台上运行。
我安装了 expo 包并在根目录中添加了一个 index.js 文件。但是当我运行 android 代码时,它在捆绑阶段引发了 Can't find variable: require
我上传了我的代码 here .有谁知道我在这里错过了什么?
最佳答案
重置缓存对我有用。
在世博会上
expo r -c
纯 React Native
react-native start --reset-cache
关于javascript - react native : Can't find variable: require,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52280692/