英文:
using expo-print and getting this error -> TypeError: Cannot read property 'Orientation' of undefined, js engine: hermes
问题
我在我的Expo托管的React Native项目中使用Expo SDK 49。
如果我包含以下导入语句:
enter image description here
然后在运行应用程序时立即出现以下错误:
TypeError: 无法读取未定义的属性 'Orientation',js引擎:hermes
有人遇到过这个问题吗?
尝试升级到Expo SDK 49,也尝试重新安装了Node模块。错误仍然存在。
英文:
Im using expo SDK 49 on my expo managed react-native project.
If I include import statement
enter image description here
Then this error gets immediately thrown when the app is run
TypeError: Cannot read property 'Orientation' of undefined, js engine: hermes
Has anyone faced this issue
Tried upgrading to expo SDK 49, and also tried reinstalling node modules. Error still persists
答案1
得分: 0
找到解决方案,
我当时正在使用 Expo 的开发模式。当使用依赖于原生模块的包时,我必须再次使用 eas build --profile development --platform android
构建该包。
英文:
Found the solution,
I was running on expo dev mode. When using packages that rely on native modules, I have to build the package again with eas build --profile development --platform android
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论