简体   繁体   English

每次构建 react-native 项目时,如何避免下载 gradle 依赖项?

[英]How to avoid downloading gradle dependencies each time react-native project is build?

I am working on a react-native android project.我正在开发一个 react-native android 项目。 For which I am using "react-native run-android" command to build and execute the android project.为此,我使用“react-native run-android”命令来构建和执行 android 项目。

But each time I use above command, the react-native system downloads the gradle component while it's already installed in my system.但是每次我使用上面的命令时,react-native 系统都会下载 gradle 组件,而它已经安装在我的系统中。 Had cross checked that the installed version is same as that which is about to get install via react-native-cli.交叉检查安装的版本与即将通过 react-native-cli 安装的版本相同。

Would like to know is there a way by which the existing downloaded gradle can be used rather than downloading it?想知道有没有一种方法可以使用现有下载的 gradle 而不是下载它?

Thanks for reading.谢谢阅读。

构建调试 apk 后,您可以使用“react-native start”代替“react-native run-android”。它会在不下载 gradlew 属性的情况下启动服务器。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM