mohitkacha1234
mohitkacha1234

Reputation: 13

android studio not generating iml file?

hi i am android developer and i am getting some problem , usually i do not care about .iml file in project folder but my senior said me that i do not have .iml file in my project . i do not know what the usage of .iml file and how to use it .

but the main thing is that android studio is not generating .iml file for my any project . for example in other developers project , if project name is apple than there would be apple.iml in project folder but it is not happening in my case . i have also updated my Android Studio in hope that it would get fix but it didn't .

well , please help me how to fix this problem and also tell me what is the usage of .iml file in android projects

Upvotes: 1

Views: 2422

Answers (4)

Ana Claudia
Ana Claudia

Reputation: 507

To fix this problem:

  1. Close your IDE
  2. Delete the .idea folder
  3. Start your IDE again. Your .idea folder will be generated again, including the iml file.

IML file stands for IntelliJ IDEA Module, created by an integrated development environment (IDE). It’s a popular contact management software used to develop java applications and games. IML file stores information concerning development modules like an android, plugin, java, or maven component of a java application. It stores modules, paths, types, dependencies, and order settings. Additionally, it stores a module-level setting for larger development projects while using XML formatting. In case you delete a module IML file, you can regenerate the file by rebuilding your project, reimporting your project, or opening and closing IDE. IML file is referenced and generated within IDEs.

Upvotes: 0

Trung Đoan
Trung Đoan

Reputation: 733

Go to Settings > Build, Execution, Deployment > Gradle > check generate *.iml files for modules imported from gradle. After change settings, resync project, iml files will be generated.

enter image description here

Upvotes: 2

Chetankumar Akarte
Chetankumar Akarte

Reputation: 114

To generate a new .iml file

  1. You have to delete all the folder starting with the dot(.) like .idea, .dart_tool and pubspec.lock file

  2. The project folder name should be all lowercase, with underscores to separate words, just_like_this.

  3. Open your project in the Android Studio from terminal run this command flutter create --platforms=android .

  4. This will generate just_like_this.iml file for you. If your package name is different then delete a new directory generated in your project file if needed.

Upvotes: 0

Deep Lathia
Deep Lathia

Reputation: 770

IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.

In case if an .iml file is not generated on your project, there are two ways to do that,

First:

  1. Go to Android Studio and open your project.
  2. Go to Files
  3. Select Sync Project with Gradle Files

Second:

  1. Close your Android Studio
  2. Go to your root project directory
  3. Delete the .idea folder. If not visible you can check the hidden folders
  4. Import the same project again.

This should re-generate your .iml files

Upvotes: 2

Related Questions