Import and export projects
This option imports the selected project to IntelliJ IDEA as is (opens it). If you want to set custom settings while importing the project (for example, select another SDK or choose the libraries that you want to import), refer to Create a project from existing sources.
- Launch IntelliJ IDEA. If the Welcome screen opens, click Open . Otherwise, go to File | Open .
- In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
- When you import or clone a project for the first time, IntelliJ IDEA analyzes it. If the IDE detects more than one configuration (for example, Eclipse and Gradle), it prompts you to select which configuration you want to use. If the project that you are importing uses a build tool, such as Maven or Gradle, we recommend that you select the build tool configuration. Select the necessary configuration and click OK . The IDE pre-configures the project according to your choice. For example, if you select Gradle , IntelliJ IDEA executes its build scripts, loads dependencies, and so on.
- If you have been working with another project, select whether you want to open the new project in a new dialog or in the current one.
For more information about getting a project from version control, refer to Check out a project from a remote host (git clone).
Import a project with settings
This section describes the functionality that is available out of the box. If you are using a framework plugin, refer to the corresponding documentation section.
Import a project from an external model
Use this type of import if your project comes from an external model, and you want to import it as a whole. In this case, IntelliJ IDEA interprets the project files (for example, your Eclipse project will be migrated to IntelliJ IDEA).
- Launch IntelliJ IDEA. If the Welcome screen opens, press Control+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, go to File | New | Project from Existing Sources .

- In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
- Select the external model that your project uses:
- Eclipse
- Maven
- Gradle: select the necessary build tool and click Finish . For Maven and Gradle projects, the IDE configures the settings automatically. You will be able to adjust them after the project is imported.

Create a project from existing sources
Use this type of import to create an IntelliJ IDEA project over the existing source code that is not necessarily an exported project.
- Launch IntelliJ IDEA. If the Welcome screen opens, press Control+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, go to File | New | Project from Existing Sources .

- In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
- Select the Create project from existing sources option and click Next .

- Specify the name and location and select a format for the new project. It’s recommended that you use the directory-based format. Click Next . If you are importing the project to the same directory, the IDE asks you whether you want to overwrite it. If you click Yes , IntelliJ IDEA will overwrite the files in .idea directory and the .iml files, your source files will remain intact.

- Select the directories that you want to use as source root directories (folders with your source code) and click Next .

- Select the libraries that you want to add to the new project. You can join several selected libraries or archives into a new library by clicking or split the selected library into two by clicking . Click Next

- Review module structure: select the modules that you want to include in your project. You can merge several modules into one by clicking or split the selected module into two by clicking . Click Next
- Specify the SDK that you want to use. If the necessary SDK is already defined in IntelliJ IDEA, select it from the list on the left. Otherwise, click and add a new SDK. Click Next .

- Enable support for the detected frameworks and technologies: select checkboxes next to the necessary items. You can also specify how the files-indicators should be grouped: by type (by framework) or by directory (by location).
- Click Finish .
Export a project
You can save a project as a .zip archive or export it to Eclipse.
Save a project as a .zip file
The option to export a project to a .zip file is available if the Android bundled plugin is enabled.
- Go to File | Export | Project to Zip File .
- In the dialog that opens, specify the path to which you want to save the .zip file with the project and click Save .
Your project will be saved to the specified location as a .zip archive.
Как правильно переименовать проект?
Есть проект A. Его нужно переименовать в проект B. Как правильно нужно переименовать проект и что в нем нужно изменить, чтобы при установке двух apk A и B приложения не затирали друг друга, а были двумя разными приложениями на телефоне?
Отслеживать
5,002 2 2 золотых знака 17 17 серебряных знаков 40 40 бронзовых знаков
задан 1 авг 2016 в 17:11
Lucky_girl Lucky_girl
3,021 13 13 серебряных знаков 37 37 бронзовых знаков
1 авг 2016 в 17:16
@iFr0z Спасибо!
1 авг 2016 в 17:23
Рад был помочь! 🙂
1 авг 2016 в 17:24
@iFr0z, вы б в ответ бы написали б)
1 авг 2016 в 20:12
@ЮрийСПб исправился:)
2 авг 2016 в 5:41
2 ответа 2
Сортировка: Сброс на вариант по умолчанию
Необходимо открепить объединение средних имен в пакете, для этого нужно выбрать параметры отображения структуры проекта, которая находится над самой текстурой и убрать галочку «Compact Empty Middle Packages»:

Когда имена будут откреплены, каждое из имён можно изменить отдельно. Меняем необходимые имена выбрав из контекстного меню Refactor – > Rename или Shift+F6. При появлении предупреждения нажимаем Rename Package .

При изменении первого имени пакета – com/ru/ua необходимо нажать “Rename all”, т.к. внутри этой папки расположены паки библиотек, в которых так же необходимо заменить имена.
Теперь имя пакета изменено, связи в классах переписаны, но настройки проекта еще не знают, что мы что-то сделали. Для оповещения открываем build.gradle (Module:app) , находим в нём следующий участок кода:
defaultConfig < applicationId "com.name.test" // изменить на новое нужное minSdkVersion . targetSdkVersion . versionCode . versionName ". " >
и изменяем имя пакета на новое. В большинстве случаев Gradle сам определит, что были внесены изменения и предложит синхронизироваться с проектом, показав соответствующее уведомление в правом верхнем углу. Но если этого не произошло, то необходимо выполнить синхронизацию вручную. Для этого отправляемся в меню Tools –> Android –> Sync Project With Gradle Files .
Последнее что осталось сделать, так это изменить имя пакета в манифесте, хотя для активностей имена уже будут изменены. Открываем файл манифеста AndroidManifest.xml и в самом верху изменяем имя:
// изменить на новое нужное
Если после выполнения всех шагов Android Studio не сможет инициализировать R.java , и будут выводиться уведомления Cannot resolve symbol R , то необходимо очистить проект, перейдя в соответствующее меню Build -> Clean Project .
Если скучно читать, то посмотрите видео
Renaming a project in IntelliJ IDEA

I have some projects where the directory containing the project is called «Code». When I open IDEA, in my recent projects list all I see is that name. Is there any method to change this in settings ? I tried going to File->Project Structure->Project, I couldn’t find the Project Name option in IntelliJ IDEA 13. I see this in my project settings.
38.8k 23 23 gold badges 114 114 silver badges 156 156 bronze badges
asked Jan 17, 2014 at 3:50
9,091 7 7 gold badges 28 28 silver badges 32 32 bronze badges
Right click on «Code» -> Refactor -> Rename. Is this what you looking for?
Jan 17, 2014 at 7:03
Not really, I want to change what IntelliJ uses as the project name. I can change module names using Refactor -> Rename, but doesn’t seem to affect the project’s name.
Jan 17, 2014 at 13:10
@PaulVerest it’s not the same problem that I was having. Please see my first response to the accepted answer.
Mar 31, 2017 at 1:40
May 12, 2022 at 22:31
15 Answers 15
You can change the project name, which is the name that is shown in the recent projects list, like so:
Go to Project Structure ( Ctrl + Alt + Shift + S ) → Project Settings / Project → Project name:

Please note that this is not to be confused with name of the root module, or folder on the file system, which may or may not be similar.
Edit
Please try going into your .idea folder in the project, create a file named .name and enter a project name on a single line.
my-new-project-name
Then restart IntelliJ.
This presumes you are using a folder-based Idea project in .idea (rather than file based, with .iws file etc)
12.4k 11 11 gold badges 65 65 silver badges 75 75 bronze badges
answered Jan 17, 2014 at 7:38
vikingsteve vikingsteve
38.8k 23 23 gold badges 114 114 silver badges 156 156 bronze badges
Hi, I don’t see that option. I added a screenshot of my project structure dialog.
Jan 17, 2014 at 13:08
Wow, weird screenshot. Project name should be right above Project SdK. Is this a mac thing?
Jan 17, 2014 at 13:44
Manually updating the contents inside the .name file also fixed same problem for me in Android Studio 0.8.9
Oct 20, 2014 at 20:06
also change the project name in settings.gradle
Jul 15, 2022 at 16:00
Meanwhile I talk about IntelliJ 2016.2.
There are various names involved.
- Red the folder name. I.e., the folder where the project is located. This name appears the the project structure and in the path on the top window.
- Blue the name of the iml file. You can rename the iml file, when the iml file is different from the folder name, you have them both in the project view.
- Yellow the project name can be set as described by @vikingsteve (Project Structure (ctrl-alt-shift-s) -> Project Settings / Project -> Project name) in the response above. You will find the project name written in the file «.name» in the .idea folder. It is also the name which appears in the open recent file list.
- brown if your project is a maven project, you will additionally have the artifact id in the pom.
Usually all these names are the same which makes life easier.
Sometimes they are not. There are many reasons why they should be different. E.g., this helps me to differentiate project versions (I also use the image background feature of IntelliJ 2016.2) when I have simultaneously the same project on two branches.
While you change these names, IntellJ may generate a new *.iml with the artifactId name (brown). In this case just delete the *.iml file you don’t want to keep.

310k 103 103 gold badges 865 865 silver badges 1178 1178 bronze badges
answered Aug 15, 2016 at 7:55
2,274 1 1 gold badge 23 23 silver badges 26 26 bronze badges
+1 as this helped me solve a different question I didn’t know how to explain. The blue circle next to the red circle
Sep 14, 2016 at 20:14
Why are you using iml files and not .idea folder?
Mar 7 at 9:39
Following are the steps to be followed in IntelliJ Idea Community Edition:
- Go to File >> Project Structure >> Project > Project Name Update project name with its new name.
- Go to pom.xml Update project name with its new name in the
- Select «Project» view and click root folder of the project then refactor its name.
- Exit IntelliJ Idea and Rename root folder name in the windows directory structure where this project repository is stored.
- Restart IntelliJ Idea and import the project using «Import project from existing resource» option.
answered Apr 8, 2016 at 21:28
1,993 2 2 gold badges 20 20 silver badges 23 23 bronze badges
This is the only answer that worked for me (reading down from the top). I had no idea you needed to refactor the project name (in 3). It’s weird to me that that’s a separate thing from the Project Name in Project Structure.
Mar 21, 2018 at 16:33
Note that if you just want to change the name of the project, you only need step 1. The IntelliJ project metadata (.e.g, contents of .idea directory, *.iml files) will remain the same. You probably still want to change the project name in your pom.xml to keep things consistent. If you’re project is not a Java Maven project, you won’t have a pom.xml.
Aug 24, 2020 at 12:59
I’m surprised this isn’t at the top, where it should be
Jul 15, 2021 at 3:56
Tips for renaming a Gradle project
- Exit IntelliJ IDEA
- Edit contents of the following files /settings.gradle /.idea/.name
- Open IntelliJ IDEA
- Refresh Gradle Project
answered Jul 20, 2017 at 3:41
1,266 2 2 gold badges 13 13 silver badges 24 24 bronze badges
Thanks for this simple and effective solution!
Mar 1, 2021 at 6:50
This is the best answer. Thanks @roblogic
Sep 20, 2021 at 11:52
Am using intellij 2017.2.6
- Go to project view
- Right Click on the top root element
- Choose Refactor-> Rename
- Small dialog appear -> enter the desired name
- Click ok


answered Jun 11, 2018 at 21:58
9,323 14 14 gold badges 59 59 silver badges 91 91 bronze badges
Nope, that doesn’t work in changing the root folder name or anything else in the project. It just adds the renamed version in block parenthesis.
Aug 11, 2021 at 14:07
Actually this is a maven project and its name is defined from the maven pom.xml So if you want to change the name you need to change its name in pom.xml
from
Code
My-prject-name
answered Apr 15, 2014 at 13:56
5,495 2 2 gold badges 37 37 silver badges 41 41 bronze badges
This worked for me:
- Renamed module folder
- Updated module name in settings.gradle
- Updated all build.gradle references
- rm -rf .idea/modules/[module]
- Rebuild project
answered Dec 29, 2018 at 18:06
748 1 1 gold badge 7 7 silver badges 20 20 bronze badges

I completed the renaming as below.
The attached image is structured in project folder.
Must make changes in the xml into a new project name.
- close IDEA intellij (14.0.2)
- change intellij project name (folder) e.g) old_project_name -> new_project_name
- change .idea in folder
We have only changed the
1) artifacts in folder -> xml
2) runConfigurations in folder -> xml
(Depending on your project structure, your folder may not contain xml )
- restart IDEA intellij
- File -> Import Module. [your intellij project]
I hope this helps you 🙂
answered Feb 13, 2015 at 14:05
119 1 1 silver badge 5 5 bronze badges
- Rename project in project tree view
- Rename project folder in project files tree view
- Rename artifactId and id in pom.xml (if maven is used)
answered Apr 25, 2018 at 11:45
BaiJiFeiLong BaiJiFeiLong
3,904 1 1 gold badge 32 32 silver badges 30 30 bronze badges
Once you have changed the project name by following the other suggestions mentioned in this thread, you can also change the module name within the project settings -> Modules:

This will change the name that is included within the brackets just next to the name of the project:

After this, proceed to refactor and rename the class that contains the main method to match your new project name. (This class is normally auto-generated by intelliJ after creating a new project).
That should do it. Cheers!
answered Aug 18, 2020 at 1:49
1,627 3 3 gold badges 23 23 silver badges 28 28 bronze badges
It is possible just to show project module name instead of folder[module], I was able to hide path but in my opinion it is also usefull justo showing the module name and not foder[module]
Nov 3, 2020 at 11:19
If your project is file based, you cannot rename the project from within IDEA.
Convert your project to a directory based format, and then you will have the option to rename it under «File > Project Structure > Project > Project Name».
answered Jun 9, 2015 at 23:44
977 10 10 silver badges 16 16 bronze badges
For Gradle Springboot intellij project:
1. settings.gradle :
rootProject.name = ‘new-name-project’
add/edit the above line at the bottom of the page
2. application.properties
spring.application.name=new-name-project
add/edit the above line at the top of the page
3. Go to file > project stricture > Project> Project-name: new-name-project
4. Apply and restart Intellij
answered Oct 4, 2019 at 14:37
193 2 2 silver badges 8 8 bronze badges
I recently figured out a way to do this.
I wrote a bash script that you run from the root folder of your project (only tested on Mac) to rename all of the files in the .idea folder that contain your project name, and do a find-replace inside those files.
BE CAREFUL: Make sure your project name is unique — i.e., a project name like ‘towers-of-hanoi’ is unique and the script will have no problems, but a project called ‘a’ will, as all instances of ‘a’ in the files will be replaced with the new project name.
answered Jan 1, 2017 at 23:15
Dylanthepiguy Dylanthepiguy
1,641 19 19 silver badges 47 47 bronze badges
UPDATE IntelliJ 2021.2.3 (complete, including maven)
Covers the project, maven configuration (including multi-module), and file system folder. Eliminates project name in brackets in project view.
- Backup your project!
- Go to File | Settings | Build, Execution, Deployment and delete all trusted locations. Related to some project security settings. In my case, Maven was broken until I did this and reset my Build Tools | Maven settings.
- Go to File | Project Structure and enter new name
- In IntelliJ project view: for each module, right-click top level module folder and select Replace in files… Enter current project name in find box and new project name in replace box. Either selectively replace by file or click Replace all
- Repeat step 3 for the .idea folder
- Exit IntelliJ to file system
- Rename project directory to new name
- Back in IntelliJ, the project window will open because it can’t find the project
- Delete the old project entry (no files are deleted, this is just the recently used project list)
- Click Open , navigate to the new directory and click Ok
Notes My run configurations are stored in files and were updated. If not, per Jetbrains doc, they are stored in workspace.xml and should be updated but I did not test this. After my project opened, I rechecked for the old name and there was still one instance in a .idea xml file but this may have been an anamoly. I changed it and restarted IntelliJ just for good measure.
