如何构建针对NX.DEV环境特定环境的本机应用程序

发布于 2025-01-25 09:25:19 字数 413 浏览 5 评论 0原文

我将NX.DEV用于我的React本机应用程序,我配置了3个环境。开发,质量检查和舞台。添加了相同的产品流量。

ENVFILE=.env.qa && ./gradlew assembleqaRelease

在运行上述命令时,构建了一个用于质量检查环境的应用程序,并且可以按预期工作。


ENVFILE=.env.qa npx nx build-android merch-app --apk

执行上述代码后,在Android/app/build/utputs/apk/3文件夹下创建了DEV,QA和登台。只有开发应用程序正在工作,其他2个应用程序正在崩溃。

我认为这是因为NX配置,有人可以帮助我设置NX.JSON/PROCEPT.JSON配置。

I used nx.dev for my react native application, I have configured the 3 environments. Dev, QA, and Staging. Added productFlavors for the same.

ENVFILE=.env.qa && ./gradlew assembleqaRelease

On running the above command, an app for qa environment is build and it's working as expected.


ENVFILE=.env.qa npx nx build-android merch-app --apk

When the above code is executed, under android/app/build/outputs/apk/ 3 folder are created dev, qa and staging. Only dev app is working, other 2 apps are crashing.

I think it's because of the nx configuration, can someone help me with setting up the nx.json/project.json configuration.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

默嘫て 2025-02-01 09:25:19

如果要使用NX Workspace中的任何特定版本的Reat Native,请使用旧版本的NX Workpace的创建项目如下-NPX

[email  procected]

data-cfemail = “

if you want to use any specific version of reat native in nx workspace, then use create Projects with older version of nx workpace as below -

npx [email protected]

this will create react native project with "react-native": "0.67.4",

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文