简体   繁体   English

react-native android构建缓慢

[英]react-native android build slow

Recently I updated my react-native project to latest version.最近我将我的 react-native 项目更新到最新版本。

I noticed, that after tha update, running and debugging android version from Android Studio takes much longer time (~170seconds instead of ~30 seconds).我注意到,在更新之后,从 Android Studio 运行和调试 android 版本需要更长的时间(~170 秒而不是~30 秒)。

Also I noticed, that most expensive tasks are generateDebugRFile .我还注意到,最昂贵的任务是generateDebugRFile

Could this tasks be optimized in some way?可以以某种方式优化此任务吗?

For some reasons, I had maven { url 'https://dl.bintray.com/guardian/android' } in my build.gradle file.由于某些原因,我的 build.gradle 文件中有 maven { url 'https://dl.bintray.com/guardian/android' }。

Removing it fixes the issue.删除它可以解决问题。

npx react-native run-android --active-arch-only npx react-native run-android --active-arch-only
source资源

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

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