Android on Netbeans 6.9.1: Package name not valid
Asked Answered
S

3

6

I am new to Android Development. Actually, I haven't started yet because I always get the error: "Package name not valid" when trying to create a new Project in Netbeans 6.9.1. I've installed Android SDK (path is set in NB) and Platforms are available. Does anyone know what I've done wrong or how I could solve my problem. I want to start soon.

Sincerely

Sarto answered 24/4, 2011 at 22:21 Comment(1)
Can you show the package name in question?Recitation
M
15

For creating a package use a dot, not a space, example:
android.bug not android bug

Markson answered 3/7, 2011 at 12:21 Comment(0)
S
2

It has to be in reverse DNS format (e.g. com.example). More info here.

Severson answered 5/5, 2011 at 19:55 Comment(1)
It can be, but does not need to be. 'foo' is a valid package name.Recitation
M
0

Even though this is a pretty old topic, I'll add one more reason one why someone can get an invalid package name.

The package name cannot include a Java language keyword such as int, long, interface, etc. For example, "com.myDomain.myApp.interface" would not be a valid package name. However, "com.myDomain.myApp.interface_" is a valid package name.

Maramarabel answered 2/1, 2019 at 17:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.