Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a directory folder in Android Studio?

I'm using Android Studio and I want to create a directory folder inside the lib folder. I right-clicked on the lib folder but the directory option is not showing. Can anyone suggest to me how to create a directory folder inside a folder? enter image description here

like image 335
Husna Avatar asked Jul 24 '18 05:07

Husna


People also ask

How do I create a folder in Android emulator?

You can only create a folder on a filesystem or parent folder where you have write permission. You need to look at the external storage API, or if you prefer (but with more limitations, particularly on accessing the data from a connected PC), the internal storage one.

How do I create a folder in Android root directory?

Show activity on this post. File mydir = context. getDir("mydirectory", Context. MODE_PRIVATE); //Creating an internal dir; File fileWithinMyDir = new File(mydir, "myAwesomeFile"); //Getting a file within the dir.

How do you create a new directory?

Create a New Directory ( mkdir ) The first step in creating a new directory is to navigate to the directory that you would like to be the parent directory to this new directory using cd . Then, use the command mkdir followed by the name you would like to give the new directory (e.g. mkdir directory-name ).

What is a directory in Android Studio?

Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects. The main directory contains configuration files for Android Studio and the Gradle build files. The application relevant files are contained in the app folder.


2 Answers

You need to go File -> Project structure. enter image description hereSelect lib folder and unmark as source

like image 198
Ilya Avatar answered Sep 20 '22 19:09

Ilya


Right click on the package then "Mark Directory as" -> Unmark as Sources Root. All child packages will be seen as folders.

enter image description here

like image 21
Bakri Bitar Avatar answered Sep 20 '22 19:09

Bakri Bitar