Paranoid Android
Paranoid Android

Reputation: 5037

Organize Android src folder in subfolders (Eclipse)

Sorry for the noob question but I am pretty new to the Android SDK/Eclipse environment

The application I am developing is getting pretty big with several classes. I would like to organize it better, having folders for views, models, dialogs ect...

How can I create a subfolder of the src folder? If I right click on the src folder I do not have that option...Should I create a new package?

I tried to add a new src folders, but that goes to the same level of the main src folder with "default package" path and Eclipse does not see my files there...

What is the best way to have a folder structure for all my classes in a project?

Thanks

Upvotes: 9

Views: 4771

Answers (4)

You must
Right click on "youfolder" -> "Build path" -> "add to build path" or "user as source folder"

Upvotes: 1

j2emanue
j2emanue

Reputation: 62529

Its because your using package explorer. Switch to Navigator (window-->show view ---> other -------> Navigator)

now you can see the project as folders instead of packages.

Upvotes: 2

Houcine
Houcine

Reputation: 24181

right click on the src folder => New => Package => rename your package for example to :

com.yourapplication.model
com.yourapplication.view
com.yourapplication.utils
com.yourapplication.adapters

etc

Upvotes: 5

Nam Vu
Nam Vu

Reputation: 5725

right click to folder, select new package

Upvotes: 6

Related Questions