在 React Native 中更改应用程序名称
问题描述:
我正在研究如何更改 ReactNative 应用程序名称.在我的设备上安装的 APK 只是带有 Android 图标的App".我该如何更改?
I'm trying to figure out how to change a ReactNative app name. The installed APK on my device is simply "App", with the Android icon. How can I change this?
我尝试更改 package.json 并重新运行 react-native upgrade 但它没有更新 AndroidManifest.xml
I've tried changing package.json and re-running react-native upgrade but it didn't update AndroidManifest.xml
答
生成器不会覆盖位于 android/app/src/main/res/values 中的
,因此您必须手动更改 strings.xml
文件/app_name
变量
The generator does not override the strings.xml
file located in android/app/src/main/res/values/
, so you have to change the app_name
variable manually