gpt4 book ai didi

仅 react native 构建(android)

转载 作者:行者123 更新时间:2023-12-04 04:52:21 25 4
gpt4 key购买 nike

场景

我使用 react-native run-android 构建我的 android 项目,但它也运行该项目。因为我正在使用 npm 插件来修改我的构建信息,所以我只对构建而不是启动感兴趣。

问题

使用 native react 是否可以在不启动的情况下构建 android 文件?理论上类似于 react-native build-androidreact-native run-android --build-only

额外信息

我查看了 react-native run-androidhelp,但没有看到任何有希望的东西。

$ react-native run-android --help
Scanning folders for symlinks in /Users/Jackson/Sites/fnmultiapptest/node_modules (11ms)

react-native run-android [options]
builds your app and starts it on a connected Android emulator or device

Options:

--install-debug
--root [string] Override the root directory for the android build (which contains the android directory) (default: "")
--flavor [string] --flavor has been deprecated. Use --variant instead
--variant [string]
--appFolder [string] Specify a different application folder name for the android source. (default: "app")
--appId [string] Specify an applicationId to launch after build. (default: "")
--appIdSuffix [string] Specify an applicationIdSuffix to launch after build. (default: "")
--main-activity [string] Name of the activity to start (default: "MainActivity")
--deviceId [string] builds your app and starts it on a specific device/simulator with the given device id (listed by running "adb devices" on the command line).
--no-packager Do not launch packager while building
--port [number] (default: 8081)
--config [string] Path to the CLI configuration file
-h, --help output usage information

最佳答案

导航到 android 目录并运行 ./gradlew assembleDebug。然后您可以手动安装。

关于仅 react native 构建(android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52895736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com