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
app module through GradleIn the root folder of your project, open the settings.gradle file for editing.
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.
I struggled with this because I'm developing a library, and every now and then want to run it as an application.
From app/build.gradle, check that you have apply plugin: 'com.android.application' instead of apply plugin: 'com.android.library'.
You should also have this in app/build.gradle:
defaultConfig {
applicationId "com.your_company.your_application"
...
}
Finally run Gradle sync.
I had to select "Use classpath of module:" drop down option and choose my module.
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.
Run the app, it will show 'Edit Configuration' window.
Under Module - select the app (it would be <no module> ).
Then select the activity (under Launch Options)
Remove from app gradle this code
android{
defaultConfig.applicationId="com.storiebox"
}