I\'ve imported a project to Android Studio with several subprojects.
I want to run a subproject.
I successfully made this subproject\'s build.gradle as a mo
I had similar issue when I selected parent directory of my project, I resolved by Close Project -> Delete Project from Android Studio -> Import Project by selecting right build.gradle file.
Make sure you select right build.gradle file while import.
It was fixed for me after removing and re-adding the Android and Android-Gradle Facets in the Module Settings dialog.
Make sure your build.gradle is
apply plugin: 'com.android.application'
not
apply plugin: 'com.android.library'
After you have changed, please sync your gradle again.
New project. Fixed this issue by clicking on "File->Sync Project with Gradle Files"
I have tried all the options with no luck. So I have ended up with my working solution. Just make following steps:
settings.gradle
of your project and include ':YOUR_MODULE_NAME'
.This worked for me: File > Project Structure... > Modules > Green Plus Symbol > Import > Then Select The Project