Android Studio run configuration shows 'Module not specified'
Error: Module not specifiedShort answer
The Android App run configuration has an empty Module field, so Android Studio does not know what to launch. Open Run, Edit Configurations, and choose your app module in the Module drop-down. If the module you need is not offered there, it is not part of your Gradle build and needs to be included.
Fix it fast
1Find out which cause you have
Open the configuration and look at the Module field. If it is blank, set it. If your app module is not offered, go to the second cause.
Run > Edit Configurations... > Android App > Module2Match what you see, then jump to its fix
What does the error look like?
Error: Module not specifiedRun/Debug Configurations: Module not specified
Cause 1 of 2
The configuration was created or imported without a module
1Check
Android Studio saves run configurations in the project. A copied .idea folder or a deleted module leaves one pointing at nothing.
grep -rn "module name" .idea/runConfigurations/ 2>/dev/null2Fix
Select the module in the Module field, then apply. Android's documentation describes this field as the module the configuration applies to.
Run > Edit Configurations > Android App > Module > app > Apply3Verify
Press Run. The build starts and the app installs.
./gradlew :app:assembleDebugConfirmed by developer.android.com
Cause 2 of 2
The app module is not in the Gradle build, so no module exists
1Check
A module appears only when Gradle includes it. Its name must match an include in settings.gradle(.kts).
cat settings.gradle*2Fix
Add the module to settings, check it applies com.android.application, then sync the project.
// settings.gradle.kts
include(":app")3Verify
Sync, and confirm the Gradle task exists.
./gradlew :app:tasks --all | grep assembleDebugConfirmed by developer.android.com
How do I stop it coming back?
- Do not delete the initially created run configuration; Android's docs recommend keeping it.
- Do not commit a personal .idea folder; share only the run configurations you mean to share.
- Sync after any change to settings.gradle.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
The phone shows as unauthorized and Android Studio will not run the app
adb devices lists the phone but Android Studio cannot deploy to it
An unauthorized phone means it has not trusted this computer's RSA key.
3 causes, each with a fixMobile apps
Android Studio cannot pair the phone over Wi-Fi
The Pair devices over Wi-Fi dialog lists no device
Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.
4 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fix