React 本机构建版本未反映调试所做的更改(android) [英] React native building release isn't reflecting changes that debug does (android)
问题描述
我对 React Native 应用程序进行了一些样式更改.在调试中一切看起来都很好,所以我尝试使用react-native run-android --variant=release"运行发布变体,并且调试中的任何更改都没有出现.我确定我没有疯,并删除了背景图片.发布版本根本没有改变.然后我尝试生成签名的 apk 并手动安装.同样的事情.
I made some styling changes to my react native app. Everything looks good in debug so I tried to run the release variant using 'react-native run-android --variant=release' and none of that changes in debug show up. I made sure I wasn't crazy and removed the background image. The release variant didn't change at all. I then tried generating the signed apk and installing it manually. Same thing.
我似乎在谷歌上找不到任何东西.有没有人以前遇到过这个问题或有什么尝试的建议?我已经梳理了所有配置文件,一切似乎都正确.我知道不看代码很难,但我不能分享它,因为它仅供公司内部使用.
I can't seem to find anything on google. Has anyone had this problem before or have suggestions on what to try? I've combed through all the config files and everything seems right. I know its hard without being able to look at the code but I can't share it since its for internal company use only.
推荐答案
对于任何仍在为此苦苦挣扎的人,更新 index.android.bundle 通常可以解决此问题:
For anyone still struggling with this, updating index.android.bundle usually solves this issue:
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
这篇关于React 本机构建版本未反映调试所做的更改(android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!