gpt4 book ai didi

android - 更改包名称与 applicationId 之间有什么区别

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:26:38 24 4
gpt4 key购买 nike

将包名称与 applicationId 更改为最终 apk 之间有什么区别。

我知道在保留源代码方面有所不同,但可以说我得到了一些包名为 a.b.c.d 的应用程序。构建出来的apk文件会有什么不同

  1. 如果我将 a.b.c.d 重命名为 q.w.e.r 然后构建 apk 文件

对比

  1. 用q.w.e.r把applicationId改成gradle

最佳答案

包名只是为了组织你的代码。

另一方面,applicationId 用于在 Play 商店中识别您的应用。仅当您计划基于相同代码生成另一个应用程序时,您才需要更改此设置。

来自文档(https://developer.android.com/studio/build/application-id.html):

When you create a new project in Android Studio, the applicationId exactly matches the Java-style package name you chose during setup. However, the application ID and package name are independent of each other beyond this point. You can change your code's package name (your code namespace) and it will not affect the application ID, and vice versa (though, again, you should not change your application ID once you publish your app). However, changing the package name has other consequences you should be aware of, so see the section about modifying the package name.

关于android - 更改包名称与 applicationId 之间有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42366756/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com