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.
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.
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
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 "_" .
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
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