skip to Main Content

I have this:

enter image description here

I had that package called data, then I tried to create the package ‘model’ inside data, and it ended up being a single package named ‘data.model’

If I try to rename it, this is what happens:
enter image description here

And If I try to create ‘model’ inside that one, it says it already exists, and same with ‘data’ if I try to do it inside the main package.

What can I do?

2

Answers


  1. Packages are hierarchial- if you put "Model" inside "Data", it will always be "Data.Model".

    Now in Android studio- it optimizes the structure to not show packages that don’t have anything in them than other packages. You can still add classes to Data- but until you do, the UI will not show it independently to simplify the layout. It isn’t gone, it’s just now showing needless complexity.

    Login or Signup to reply.
  2. Try to choose File -> Repair IDE -> Rescan Project Indexes on showed dialog.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search