Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Default project directory

Whenever I create a new project in Android Studio it wants to put it in a generic default folder at a location something similar to (dependent on OS - Ubuntu here):

/home/USER/AndroidStudioProjects/ 

I want to change this directory to another location. Besides selecting this new location on the creation of every project, is there a setting (couldn't find) or path variable (couldn't find any documentation) that can set this directory (say /home/USER/Projects/AndroidStudio/) as the default?

Something similar to changing the workspace in Eclipse is what I am looking for.

like image 799
btalb Avatar asked Jul 23 '13 02:07

btalb


People also ask

Where is the project 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.

How can I see all projects in Android Studio?

as mentioned above, you can use the App icon to view that. Or use cmd+` on Mac to cycle through the open windows of that Application. You can also go to Help -> Default Key Reference to explore the shortcuts available.

Which folder contains the Android project Java files?

The src folder holds two most important folders on any Android project, namely, androidTest and main. The androidTest package is created to hold Test cases for testing the application code and running. This folder contains . java (JAVA) files.

What is project file in Android Studio?

A project in Android Studio contains everything that defines your workspace for an app, from source code and assets, to test code and build configurations.


2 Answers

At some point I too tried to do this, but the Android Studio doesn’t work quite like Eclipse does.

It's simpler: if you create a project at, say /home/USER/Projects/AndroidStudio/MyApplication from there on all new projects will default to /home/USER/Projects/AndroidStudio.

You can also edit ~/.AndroidStudioPreview/config/options/ide.general.xml (in linux) and change the line that reads <option name="lastProjectLocation" value="$USER_HOME$/AndroidStudioProjects" /> to <option name="lastProjectLocation" value="$USER_HOME$/Projects/AndroidStudio" />, but be aware that as soon as you create a project anywhere else this will change to that place and all new projects will default to it.

Hope this helps, but the truth is there really isn't much more to it other than what I explained here.

Let me know if you need anything else.

like image 121
Rik Martins Avatar answered Sep 28 '22 07:09

Rik Martins


This may be what you want. Settings -> Appearance & Behavior -> System Settings > Project Opening > Default Directory

  1. Open 'Preferences'
  2. Select System Settings -> Project Opening
  3. Set 'Default Directory' where you want.

It worked for me. I tried Android Studio 3.5.

like image 33
kimikimi714 Avatar answered Sep 28 '22 08:09

kimikimi714