I have accidentally erased one of my project modules .iml file and I was wondering if its possible to regenerate it. I have googled around for a bit but I have not seen a solution yet.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- In IntelliJ IDEA, how can I create a key binding t
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
Right-click on the pom.xml, -> maven -> reimport (intellij)
Find your
gradle
tab on one of your shortcut bars (I think by default it is on the vertical toolbar on the right of android studio). Click on it and you will see your gradle structure in the opened tab. On top of that tab, you can see a refresh icon. Click on it and it will reconstruct all your iml files.The solution of retrieving the deleted files might work if you work on your own, but if you have fetched someone elses config, you need to recreate your own imls for your local configuration.
In my case i deleted the
.iml
files manually and the project structure was not showing up. I just closed the intelliJ and when i opened it back, i got a notification window indicating thatNon-manged pom.xml file found
. and when i selected "Add as Maven Project" in the notification window, the project structure was back again.If your project is Gradle-based, then click the Sync Project with Gradle Files button in the toolbar and it will regenerate all .iml files.
If you can't locate this button , then just look at right for Gradle tasks -> select task -> right click -> refresh external dependency will bring you back modules and iml file.
Reimport the module (our project is maven-based, but that shouldn't matter).
Go to file -> project structures -> modules -> import module (click the +)
Then simply select your module and click through the wizard.
IntelliJ generates the
.iml
files for you.I struggled with this issue until I noticed that for some reason the pom files of these modules appear under ignored files list.
To remove those files from this list, go to:
Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Ignored Files.
And uncheck your modules!