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.
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:
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:
- Expand the src directory
- Expand com.example.Login (the app name)
- Right click on MainActivity.java
- Go to run as-> run configurations
- Browse your project
- Launch Default activity
- Run
note:
Before doing this, set an AVD by using Android virtual device manager.