14

If I own a domain name like e.g Dan-Carlos.com

Does the andoid package name allow use like com.dan-carlos.com?

I have not tried using it but I am curious if anyone tried domain name with hyphen '-' in it.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
anwarma
  • 2,005
  • 5
  • 21
  • 21

4 Answers4

16

refer to my working years and some web pages like this you should replace "-" dashes with "_" underline.

if web site is : dan-carlos.com

package name is : com.dan_carlos

2

According to the docs :

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.

So, sadly you can't use anything else except for English letters, digits, the character "." and the character "_" .

android developer
  • 114,585
  • 152
  • 739
  • 1,270
0

No unfortunately the hyphen '-' is not acceptable in a package name.

You can simply test this out by right clicking a project and going to properties -> Android -> rename application package and try out what is accepted

iko_wp
  • 739
  • 6
  • 9
0

Allowed characters in package name are A to Z (small and caps case), period (.) and underscore ( _ ). So you can have package name com.dan.carlos or com.dan_carlos

seema
  • 991
  • 1
  • 13
  • 27