What is the difference between creating a new directory and creating a new folder in Android Studio?
Here is an image of the menu choices:
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.
In the drop down menu click on the new option. After this a drop down menu opens here you will see directory option just click on that. After this enter the name of your directory / folder and press enter this will create a new folder / directory inside your root folder.
Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen. Inside this screen, you will get to see your SDK path. You can update your SDK path by clicking on the Edit option.
To do this on your device: Access the home screen panel where the apps you want to put into a folder are located. Drag the first app and drop it on top of another and this will create a folder with both apps inside. Tap the folder to view the apps in it.
Use folder when adding a folder to an Android Studio project. This is what Android Studio calls them. Directory is what IntelliJ calls a folder. Android Studio is built on top IntelliJ so there is some naming confusion.
Although there is a technical difference between a folder and a directory (see here and here), they are often (correctly or incorrectly) used interchangeably. This can be seen even in the titles of these two SO questions:
This can be confusing to new users of Android Studio when they see both choices in the menu structure. Further confusion results when users add a new directory and then it doesn't show up in the Android folder view. See these questions for example:
The folders actually do show up if you select the Project or Packages view from the menu:
However if you want an Android folder to show up automatically in the Android view you need to right click and use New > Folder > Assets folder (if you are adding an assets folder). You could then add a subfolder like "fonts" to this by choosing the New > Directory option.
Android Studio is built on top of IntelliJ IDEA. IntelliJ itself has a menu option to add a directory (as you can see here). But Android stores files in what it calls folders. So when these two platforms are put together in Android Studio, there gets to be some naming confusion. (This is my interpretation, but perhaps they really are trying to differentiate the subtle differences between directory and folder.)
You can see from your menu image that there is also an "Android resource directory" option. (You got that by right clicking on the res directory/folder rather than a subdirectory.) You would use this to add resource folders such as raw, menu, values, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With