简体   繁体   English

expo 裸工作流不能使用nativemodule

[英]expo bare workflow can't use nativemodule

Am new to expo.我是 expo 的新手。 I want to use NativeModules in expo bare flow but am not able to use NativeModules am getting undefined error.我想在 expo 裸流中使用 NativeModules,但无法使用 NativeModules 出现未定义的错误。 So Am getting doubt on does expo bare flow support Native Modules are not?所以我怀疑 expo 裸流支持原生模块不是吗?

I initially created an expo project with a comment expo init my-project blank project then I did some changes in app.js after I want to use the project as a bare flow.我最初创建了一个 expo 项目,并带有注释expo init my-project空白项目,然后在我想将该项目用作裸流程后,我对 app.js 进行了一些更改。 Then I eject the project using this comment expo eject after the eject is not able to use NativeModules with native plugins like React Native Firebase https://rnfirebase.io , applozic, etc. Then I eject the project using this comment expo eject after the eject is not able to use NativeModules with native plugins like React Native Firebase https://rnfirebase.io , applozic, etc.

Please tell me you am not able to use NativeModules in expo bare flow.请告诉我您无法在 expo 裸流程中使用 NativeModules。

Starting from EXPO SDK 42, You can detach managed Expo to Expo Custom Client, with Expo Custom Client, you can install any native modules you want and rebuild new Expo Client with your native modules embedded. Starting from EXPO SDK 42, You can detach managed Expo to Expo Custom Client, with Expo Custom Client, you can install any native modules you want and rebuild new Expo Client with your native modules embedded.

Some native modules, require changing the platform-specific settings, (build.gradle, Info.plist files, and more).一些本机模块需要更改特定于平台的设置(build.gradle、Info.plist 文件等)。 Expo exposes Config Plugins API to do those custom configurations. Expo 公开了配置插件 API来执行这些自定义配置。

On top of that, Expo has a new Expo Application Service (EAS) which builds your app on Expo servers without the need to build on your local devices and stay free from complex native development setup.最重要的是,Expo 有一个新的Expo 应用程序服务 (EAS) ,它可以在 Expo 服务器上构建您的应用程序,而无需在您的本地设备上构建并免于复杂的本地开发设置。

Popular packages like react-native-firebase provide their own config Plugin out of the box and Expo Team is maintaining config plugins for common used libraries .react-native-firebase firebase 这样的流行包提供了自己的开箱即用的配置插件,Expo 团队正在维护常用的配置插件。

With all tools and infrastructure, you don't need to eject Expo for sake of using native modules.使用所有工具和基础架构,您无需为了使用本机模块而弹出 Expo。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Bare Workflow 在 React Native Expo 中启用 Kotlin 的困难 - Difficulties enabling Kotlin in React Native Expo with Bare Workflow 如何通过 Expo 的 Bare 工作流生成 APK 文件,但使用以前的 expo 的托管工作流 JKS 文件 - How to generate APK file by Expo's Bare workflow but using previous expo's Managed workflow JKS file 将裸工作流 expo React-Native 应用程序发布到 Google Play,该应用程序之前在托管工作流中发布 - Publishing a bare-workflow expo React-Native app to Google Play which was previously published in the managed workflow 为什么 Expo 裸工作流 Android 项目会自动授予文件和媒体权限? - Why does Expo Bare Workflow Android Project automatically grant the File and Media Permission? 在根项目“我的项目”中找不到任务“lint”。 一些候选者是:'init' React Native Expo SDK 45 Bare Workflow - Task 'lint' not found in root project 'My Project'. Some candidates are: 'init' React Native Expo SDK 45 Bare Workflow 我可以在反应原生裸项目中使用 expo facebook 广告 npm 库吗 - Can I Used expo facebook ads npm library in react native bare project 如何将我的应用程序从世博会弹出到裸反应本机代码 - How can I eject my app from expo to bare react native code 找不到变量:Expo - Can't find variable: Expo 将原生 firebase 与 expo 裸应用程序集成 - React native firebase integration with expo bare apps 无法使用EXPO构建本机应用程序 - Can't build react native app with expo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM