I had successfully imported a Module
in my Application project in Android Studio
.
Then I deleted or removed the module by following the below link:
Switch to the Project
View. Then open .idea/modules.xml
. Find and delete the line that corresponds to the module. Then Invalidate Caches and Restart. That's it.
You can't import a module if you've put the code for the module in the place it will end up being copied to. I had the module source code placed in the project root folder and it failed to import with the above message. If you move the code away somewhere, on import Android Studio will copy the code in.
I am Not Sure but I hope it's Help you.
Step 1: Pressed Alt + 1 for get Focus of your App.
Step 2: Now Pressed F4 for open Module structure of Project
Step 3 Now Select Dependencies and Remove All Extra dependencies of your project.
than Pressed OK.
and Resync gradle.
I hope you are clear with my solution.
Best Luck
In one condition if you have copy a folder like this
rootProject/module1
if you import module android studio will find if you have same name folder. if you have it is not import android studio will tell you you have contains this module ,you just add this in setting.gradle like
include ':modlue1'
I had this problem when I was trying to add junit 4.12 to my project.First of all I delete old junit codes in dependencies of my build.gradle(app) file manually.Next I deleted the old junit.jar from my library with deleting libs folder and then create new libs folder directory in my app for add library.and for the end.......I find the old junit FILE near the end of project view after gradle folder....you can see in this image......and I deleted it.now I can add new module very easy and without same name error.sorry for bad english!! look this image for last order
I have encountered this. And I deleted the folder which below my project with the module name I set before, then I can import a module with same name again.
Hope this helps you.