Android - 使用两个词作为包名可以吗?

Android - Is that OK to use two words as package name?

我正在构建一个 Android 应用程序。包名可以用两个词吗?

例如:

com.myapp
com.puzzlegame
com.dingdong

使用三个词作为包名的原因是什么?

例如:

com.myapp.android
com.puzzlegame.something
com.dingdong.pingpong

谢谢!!!

您也可以使用这两个名称:

And although the application ID looks like a traditional Java package name, the naming rules for the application ID are a bit more restrictive:

It must have at least two segments (one or more dots).
Each segment must start with a letter.
All characters must be alphanumeric or an underscore [a-zA-Z0-9_].

查看官方文档以获取更多信息:

有关详细信息,请访问此 link:Set the application ID

包名传统上是反向域名加上应用名作为附加段。当您创建示例 android 项目时,包名称通常为 com.example.app。这是假设您的域名是 example.com 并且您的应用程序名称是 app 所以反过来最终将是 com.example.app