【问题标题】:Publishing android app error: You need to use a different package name because "com.xxxx" already exists in Google PlayPublishing android app error: You need to use a different package name because "com.xxxx" already exists in Google Play
【发布时间】:2021-02-03 02:02:46
【问题描述】:

我使用 react-native 制作一个应用,在 play store 上传 apk,得到这个问题: Publishing android app error: You need to use a different package name because "com.xxxx" already exists in Google Play.

我的包名它也连接到 google-services.jason(firebase 分析和 AdMob)。

如何正确更改包名?

【问题讨论】:

  • 您必须更改您的应用程序包名称以及“google-services.json”
  • 只有这一部分? "android_client_info": { "package_name": "com.xxxx" }
  • 不行,用新的包名重新下载 google-services.json
  • 我需要在 Firebase 控制台中为 android 添加一个新应用并下载 google-services.json,旧应用删除?
  • 没错,就是这样

标签: android react-native


【解决方案1】:

您肯定需要为您的应用分配一个新的/唯一的捆绑标识符。为此,您必须对以下内容进行更改:

  • applicationId 在(/android/app/build.gradle 文件
  • 在 (/android/app/src/main/AndroidManifest.xml)
  • 和其他带有包 ID 的文件

但我建议您使用包react-native-rename,它也将安全地更新应用程序和包名称。

对于 firebase (google-services.json),您需要使用新创建的 bundle id 配置另一个应用程序,然后将更新的 .json 文件附加到项目中。

【讨论】:

  • @Ismeet 如果您觉得它有帮助,我们将不胜感激:)
猜你喜欢
  • 1970-01-01
  • 2019-12-30
  • 2022-12-01
  • 2015-01-21
  • 2022-12-29
  • 2022-12-27
  • 2022-12-27
  • 2013-08-03
  • 2022-12-28
相关资源
最近更新 更多