应该是什么的Andr​​oid应用程序包的名称? [英] What should be the package name of android app?

查看:166
本文介绍了应该是什么的Andr​​oid应用程序包的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,应该是什么的Andr​​oid应用程序包的名称?意味着我们通常使用com.appname或com.organizationName.appName,但是,当我们提出我们的应用市场则有时显示相关觉得─请更改包名包名的错误。它不应该与COM等开始。

I want to know that what should be the package name of android app? Means normally we used com.appname OR com.organizationName.appName, But when we are submitting our application in to market then sometimes it shows the errors related to the package name that- Please change Package name. It should not be started with com etc..

我想知道为什么这个happnes?什么应该是正确的Andr​​oid应用程序包名?

I want to know why this happnes? And what should be Right the package name for android application?

如果有人知道这个问题的原因或答案,那么请让我知道。

If anyone knows the reason or answer of this question then please let me know.

在此先感谢。

推荐答案

正如这里:包的名字都写在全部小写避免与类或接口的名称冲突

As stated here: Package names are written in all lower case to avoid conflict with the names of classes or interfaces.

公司利用自身逆转的互联网域名,开始自己的包名,例如, com.example.mypackage在由程序员创建包名为mypackage的example.com

Companies use their reversed Internet domain name to begin their package names—for example, com.example.mypackage for a package named mypackage created by a programmer at example.com.

一个公司内发生的名称冲突是由约定,公司内部处理的,也许包括公司名称后的区域或项目名称(例如,com.example.region.mypackage)所需要的。

Name collisions that occur within a single company need to be handled by convention within that company, perhaps by including the region or the project name after the company name (for example, com.example.region.mypackage).

在Java语言本身开始的Java包。或使用javax。

Packages in the Java language itself begin with java. or javax.

在某些情况下,互联网域名可能不是一个有效的软件包名称。这可能发生,如果域名中包含连字符或其他特殊字符,如果包名以数字开头或其它字符是非法的,作为一个Java名称的开头使用,或者如果包名称包含保留的Java关键字,如INT。在这种情况下,所建议的惯例是添加下划线。例如:

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:

这篇关于应该是什么的Andr​​oid应用程序包的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆