Android: "Path for project must have only one segment"

I just setup the NotePad sample project as described here, but when I try to launch it (Ctrl+F11) I received the following error message box:

Path for project must have only one segment.

enter image description here

What does this error mean and why is it happening?

(I tried to consult this article, but it seems irrelevant to my problem because I have no getProject anywhere in this copied-verbatim sample project)


Solution 1:

I found the cause of the problem: It turns out that when I specified the (only) Launch configuration for the project (Properties > Run/Debug Settings), I forgot to specify the Project name:

enter image description here

Hmmm... I thought that if I right-click the project, its name will be taken automatically.

Anyway, it works now. Yeah! :)

Solution 2:

I faced the same problem and resolved it in the following steps:

  1. Expand the src directory
  2. Expand com.example.Login (the app name)
  3. Right click on MainActivity.java
  4. Go to run as-> run configurations
  5. Browse your project
  6. Launch Default activity
  7. Run

note: Before doing this, set an AVD by using Android virtual device manager.