Coding⏱️ 2 min read📅 2026-06-03

How to Fix: Android Studio Run/Debug configuration error: Module not specified

Android Studio Run/Debug configuration error: Module not specified. Refactor module name and update settings.gradle.

Quick Answer: Update your settings.gradle to match the new module name, then try re-opening the project in Android view.

When you refactor the module name in Android Studio, it's not uncommon to encounter a 'Module not specified' error. This occurs when the IDE fails to recognize the new module name due to changes made to the settings.gradle file.

✅ Fixing the Issue

  • Revert the changes made to the settings.gradle file to its previous state.

✅ Additional Step

Step 2: Update the Gradle Scripts

  1. Open the terminal in your project directory and run: gradlew refreshProject

Step 3: Rebuild and Run the Project

  1. Go to Run > Edit Configurations, select your module, and click on the 'Apply' button.

💡 Conclusion

By following these steps, you should be able to resolve the 'Module not specified' error in Android Studio and get your project up and running smoothly.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions