I am getting a \'Module not specified\' error in my run config. I have no module showing in the drop down yet I can see my module no probs. The issue came about when I refac
I would like to add some more information while I was facing this issue:
Ref: Answer from @Eli:
- Cut line include '
:app' from the file.- On Android Studio, click on the File Menu, and select Sync Project with Gradle files.
- After synchronisation, paste back line include ':app' to the settings.gradle file.
- Re-run Sync Project with Gradle files again.
So, let's follow the instruction and try to keep one thing in mind, that what is showing in your build configuration. Make sure you are seeing the name of your configuration app like the image below:
If you are seeing anything else, then the steps mentioned by @Eli (the most accepted answer) will not work.
An alternative Solution
If you have a different name on the Run/Debug Configurations window and the above process is not working, please change the config name to 'app'
then -> hit Apply -> then Ok.
After that follow this:-
File->Sync project with gradle files (if needed).
Now check the issue will be resolved hopefully. I have faced this issue and I think it might help others as well.