user3492641
user3492641

Reputation: 151

android studio folders inside packages

how can I have a directory structure like

src/main/java/com.L33Tcode.example/Adapters

src/main/java/com.L33Tcode.example/Fragments

android studio doesn't seem to want to let me have source folders inside a package folder for some reason. Also if I want to have jni libraries and native c++ code how can I have this inside the same package. The android studio is a great program but the directory structure is really confusing please help. Right now my project doesn't even have a package folder and none of the source code has "package" at the top but it seems to find everything alright.

Upvotes: 13

Views: 4625

Answers (3)

Juan Sancho
Juan Sancho

Reputation: 321

Yes, the "Package" is the folder

Upvotes: 2

jignyasa tandel
jignyasa tandel

Reputation: 271

Right click on your package name(src/main/java/com.L33Tcode.example). After that select New->Package and enter folder name(Fragments) watever you want. Here you can see that your package is created. package in it's self is your folder. So, you can see it from right click on your created folder(Fragments)-> show in history and show your folder init.

Upvotes: 3

Mohamad Rostami
Mohamad Rostami

Reputation: 420

Right click on your package and select new > Package then name it activity or fragment or ...

Upvotes: 0

Related Questions