Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Run/Debug configuration error: Module not specified

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 refactored my module name, changed the settings.gradle to new name.

Now when I go to project structure and select my module nothing shows in the screen, not even an error.

I'm not 100% sure, but the icon beside my module looks like a folder with a cup and not a folder with a phone.

My exact steps -

  1. Open in Android view
  2. Refactor directory name
  3. refactor module name
  4. change settings.gradle contents: name to new name
like image 529
Fearghal Avatar asked Mar 16 '15 22:03

Fearghal


People also ask

What is module Android studio?

Modules. A module is a collection of source files and build settings that allow you to divide your project into discrete units of functionality. Your project can have one or many modules, and one module may use another module as a dependency. You can independently build, test, and debug each module.


2 Answers

Resync your project gradle files to add the app module through Gradle

  1. In the root folder of your project, open the settings.gradle file for editing.

  2. Cut line include ':app' from the file.

  3. On Android Studio, click on the File Menu, and select Sync Project with Gradle files.

  4. After synchronisation, paste back line include ':app' to the settings.gradle file.

  5. Re-run Sync Project with Gradle files again.

like image 182
eli Avatar answered Oct 03 '22 02:10

eli


never mind, i changed the name in settings.gradle and synced and then changed it back and synced again and it inexplicably worked this time.

like image 37
Fearghal Avatar answered Oct 03 '22 02:10

Fearghal