以 .do 结尾的域的包名称
Package names for domains which end in .do
构建应用程序时的约定是包名称应以一个人的反向域字符串开头,例如 com.google.MySampleApp.
然而,我们公司注册的是 .do 域名,不能用作包名 (!) 因为 "do" 是 Java.
中的保留关键字
人们通常如何处理这种情况? Google Play 商店是否有特定的 "official" 标准?当然,我们不能成为第一家在多米尼加共和国拥有域名并创建 Android 应用程序的公司...?
Oracle 建议您添加下划线:
In some cases, the internet domain name may not be a valid package
name. This can occur if the domain name contains a hyphen or other
special character, if the package name begins with a digit or other
character that is illegal to use as the beginning of a Java name, or
if the package name contains a reserved Java keyword, such as "int".
In this event, the suggested convention is to add an underscore. For
example:
hyphenated-name.example.org org.example.hyphenated_name
example.int int_.example
123name.example.com com.example._123name
来源:https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html
构建应用程序时的约定是包名称应以一个人的反向域字符串开头,例如 com.google.MySampleApp.
然而,我们公司注册的是 .do 域名,不能用作包名 (!) 因为 "do" 是 Java.
中的保留关键字人们通常如何处理这种情况? Google Play 商店是否有特定的 "official" 标准?当然,我们不能成为第一家在多米尼加共和国拥有域名并创建 Android 应用程序的公司...?
Oracle 建议您添加下划线:
In some cases, the internet domain name may not be a valid package name. This can occur if the domain name contains a hyphen or other special character, if the package name begins with a digit or other character that is illegal to use as the beginning of a Java name, or if the package name contains a reserved Java keyword, such as "int". In this event, the suggested convention is to add an underscore. For example:
hyphenated-name.example.org org.example.hyphenated_name example.int int_.example 123name.example.com com.example._123name
来源:https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html