What is the rule of the name of the packages that start with number?

前端 未结 5 1824
有刺的猬
有刺的猬 2020-12-18 02:05

The package naming convention in Android is:

com.organizationName.appName

But if the organizationName or the appName starts with a number o

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 02:40

    See here about the "package" attribute in the manifest:

    A full Java-language-style package name for the application. The name should be unique. The name may contain uppercase or lowercase letters ('A' through 'Z'), numbers, and underscores ('_'). However, individual package name parts may only start with letters. To avoid conflicts with other developers, you should use Internet domain ownership as the basis for your package names (in reverse). For example, applications published by Google start with com.google. You should also never use the com.example namespace when publishing your applications.

    The package name serves as a unique identifier for the application. It's also the default name for the application process (see the element's process process attribute) and the default task affinity of an activity (see the element's taskAffinity attribute).

提交回复
热议问题