I am new to Android Studio.This is my project screenshot.My project builds successfully but when i run it only Build Successful is shown.
By what I understand I think where build is written in the toolbar there should be my project name.When I go to Edit Configuration inside Module there is only one option that is No Module while I think my project name should be there.When I right click on my project and click on Make Module 'Copy of IBL2 eclipse' nothing happens.This project was running fine in eclipse.

- 9,157
- 18
- 82
- 139
-
1Possible duplicate of http://stackoverflow.com/questions/18368748/android-studio-module-wont-show-up-in-edit-configuration – John McLear Sep 29 '14 at 10:46
-
This happened to me after I renamed a module from "app" to the name I actually preferred. – Edward Falk Jul 29 '20 at 21:49
-
Update: I had to edit settings.gradle, changing `include ':app'` to `include ':myappname'` – Edward Falk Jul 29 '20 at 22:24
-
Does this answer your question? [Android Studio: Module won't show up in "Edit Configuration"](https://stackoverflow.com/questions/18368748/android-studio-module-wont-show-up-in-edit-configuration) – johannchopin Mar 26 '21 at 15:15
-
In my case, I get the source code from another computer (MacOS) to Windows; nothing worked. I tried "import project": File -> New -> Import project. All project structure are changed. Works fine. – antonio Feb 21 '23 at 07:23
18 Answers
Try first in Android Studio:
File -> Sync Project with Gradle Files

- 5,239
- 1
- 30
- 24
-
-
8Apparently this is needed every time you update Android Studio and/or gradle – H. Al-Amri Mar 06 '19 at 16:35
-
5Right, but I am wondering without such experience, how do I know
was caused by Gradle Synchronization of Project issue? – http8086 Jul 20 '19 at 15:37
In the "project" page on the top left corner in android studio.
From dropdown goto Android >> Gradle Scripts >> Build Gradle(Module :app)
make sure the first line of this file is like this.
apply plugin: 'com.android.application'
not like this
apply plugin: 'com.android.library'

- 2,320
- 2
- 28
- 46
-
4Where is Android >> Gradle Scripts? I found it under the "Gradle" tab in the topish right corner of Android Studiuo. I then right clicked the name of my app and selected "open gradle config" this is where I did see my plugin was pointing to library not application and changing that got my app to run in the emulator. I'm curious why it did not automatically setup correctly and how I can get it to default to "application" moving forward? – JesseBoyd Nov 28 '16 at 04:50
-
1
CHECK if the project setting is like this,if the module that you want is show in here
IF the module that you want or "Module SDK" is not show or not correct.
then go to the module's build.gradle file to check if the CompileSdkVersion has installed in your computer.
or modifier the CompileSdkVersion to the version that has been installed in your computer.
In my case:I just installed sdk version 29 in my computer but in the module build.gradle file ,I'm setting the CompilerSdkVersion 28
Both are not matched.
Modifier the build.gradle file CompilerSdkVersion 29 which I installed in my computer
It's working!!!

- 1,468
- 15
- 22
-
4Thank you, After download the compileSDKVersion in my project & then select File-> Sync Project with gradle files options. It works. – Muthuraman Sundararaj Nov 25 '20 at 04:00
If you have imported the project, you may have to re-import it the proper way.
Steps :
- Close Android Studio. Take backup of the project from C:\Users\UserName\AndroidStudioProjects\YourProject to some other folder . Now delete the project.
- Launch Android Studio and click "Import Non-AndroidStudio Project (even if the project to be imported is an AndroidStudio project).
- Select only the root folder of the project to be imported. Set the destination directory. Keep all the options checked. AndroidStudio will prompt to make some changes, click Ok for all prompts.
- Now you can see the Module pre-defined at the top and you can launch the app to the emulator.
Tested on AndroidStudio version 1.0.1
-
1Now you don't even have do delete your project or anything. Just close your project, and in the start-up window of android studio select "Import project (Gradle, Eclipse ADT, etc.)" and select your existing project (that alreasy appears as an android studio project but it doesn't matter). Android Studio 3.4.1 – Marc Z Jun 27 '19 at 11:43
For some reason, I was missing the settings.gradle
file.
- Create
settings.gradle
under your root directory, and inside it:
include ':app'
(assuming your app is indeed inside /app
directory).
- Hit
File
->Sync Project with Gradle Files
.
After that everything worked out for me.

- 739
- 6
- 19
Other path is " tool menu-->android-->sync proyect with gradle File"

- 157
- 1
- 3
-
1Hey there. Could you at least explain why/how this would actually fix op's problem? – Félix Adriyel Gagnon-Grenier Feb 26 '15 at 18:35
-
Solved for me. I had the issue of failed gradle sync at first during a network time out. Had to try this out for gradle sync to initiate. – Monster Brain Jun 28 '19 at 10:00
I was able to resolve this issue by performing a Gradle sync
To do this:
In project view, right click the root (in my example below, "JamsMusicPlayer"
Click "Synchronize {ProjectName}"
Once this completes, you should see a module in your "Run" dialog

- 187
- 8
-
Hi , I am working with JamsMusicPlayer and want to import it into Android studio , i have done almost all the possible changes installed gradle and all , but it still not building and shows me a screen where it says something is wrong in CircleImageView library , I just imported the code , i have not touched anything yet. please help – Divyanshu Negi Dec 28 '14 at 21:32
For those of you who are visual learners here is another place to look for the fix. I did indeed find that the underlined tag was pointing to "library" and a change to "application" and then updating gradle got my project running on the emulator.

- 1,022
- 1
- 13
- 18
In my case, my compileSdkVersion and buildToolsVersion was 28 in build.gradle (app module)
android {
.
.
compileSdkVersion 28
buildToolsVersion 28
.
.
}
But SDK was not installed. So then I installed it first and it worked for me !!!

- 6,084
- 3
- 42
- 42
Sometimes the following fix will work. Go to your build.gradle of your project and add google() into the repositories element and google() should be the at the top of all the repository.
This is the sample of the repositories block. What you need to do is to add google() or if that exists already, take that to the top of all the line inside repositories
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}

- 757
- 7
- 7
Check for the file gradle.properties
in your project root folder. If not there, create a new file with the name / copy the file from other project.
Open and check both the build.gradle file and confirm you have have any error in those files.
Then, Click on the File
menu -> Sync project with Gradle Files
.

- 1,366
- 2
- 11
- 16
I had this problem, and was able to resolve it by updating the Android Gradle Plugin and Gradle version in my installation. I updated by going to File > Project Structure > Project menu and using the dropdown boxes. I've included a picture of this menu below. For more information, see the android developer website gradle plugin page.
Once the plugin and gradle version were updated, a gradle sync was able to complete successfully, and the app module appeared under build configurations.

- 336
- 1
- 7
For me the sdk version mentioned in build.gradle wasn't installed. Used SDK Manager to install the right SDK version and it worked

- 162
- 3
- 13
In my case, the project use older version of Gradle (3.3) and in new version of Android Studio that not work as usual
So i add google repo in the build.gradle
, then everything goes right
repositories {
google() // if google() not work, use below instead
// maven { url 'https://dl.google.com/dl/android/maven2/' }
jcenter()
}

- 934
- 10
- 9
Got this error in a refactor when I forgot to change the folder structure during a package name change.
com.appname.app
had forgotten to add an app folder and move the main files

- 398
- 3
- 12
I had a similar issue of my app module disappearing, this was after a large merge (from hell). I found app.iml
was missing <component name="FacetManager">
when compared with other projects and before the merge. So I copy and pasted the below under the root <module >
element.
Manually editing the .iml files maybe ill advised so proceed at your own risk.
File: project root folder > app > app.iml
Add the following...
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/debug/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>

- 23,621
- 16
- 94
- 105
I had the same issue since I changed my app ID in config.xml file.
I used to open my Android project by choosing among recent projects of Android Studio.
I just File > Open > My project to get it working again.

- 759
- 11
- 20
I had the same issue when using Kotlin DSL. The project level build.gradle.kts file seemed to be causing problems in that Android Studio could not detect it. What solved this for me was:
Rename build.gradle.kts -> build.gradle
File -> Sync Project with Gradle Files
Rename build.gradle -> build.gradle.kts
Hope it helps.

- 57
- 8