Folders for Android Studio in packages

how can i create a directory structure like

Src / home / java / com.L33Tcode.example / adapters

SRC / Main / Java / com.L33Tcode.example / Snippets

Android studio seems to for some reason not want me to have the source folders inside the package folder. Also, if I want to have jni libraries and native C ++ code, how can I get this inside the same package. Android studio is a great program, but the directory structure is really confusing, please help. Right now, my project doesnโ€™t even have a folder with folders, and none of the sources has a โ€œpackageโ€ at the top, but everything seems to be fine.

+11
source share
3 answers

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

0
source

Right-click on the name of your package (src / main / java / com.L33Tcode.example). After that, select New-> Package and enter the desired folder name (fragments). Here you can see that your package has been created. the package in it is your folder in itself. Thus, you can see it with the right mouse button on the created folder (Fragments) โ†’ show in history and show your init folder.

0
source

Yes, "Package" is a folder.

0
source

Source: https://habr.com/ru/post/979242/


All Articles