[android] Android Studio-No Module

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.enter image description here
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.

This question is related to android android-studio

The answer is


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'

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.


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


Go to Project setting enter image description here

CHECK if the project setting is like this,if the module that you want is show in here enter image description 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!!!

enter image description here enter image description here


For some reason, I was missing the settings.gradle file.

  1. Create settings.gradle under your root directory, and inside it:
include ':app'

(assuming your app is indeed inside /app directory).

  1. Hit File -> Sync Project with Gradle Files.


After that everything worked out for me.


enter image description here

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.


I was able to resolve this issue by performing a Gradle sync

To do this:

  1. In project view, right click the root (in my example below, "JamsMusicPlayer"

  2. Click "Synchronize {ProjectName}"

  3. Once this completes, you should see a module in your "Run" dialog

Gradle sync


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


Try first in Android Studio:

File -> Sync Project with Gradle Files


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.


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>

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' }
}

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.


If you have imported the project, you may have to re-import it the proper way.
Steps :

  1. Close Android Studio. Take backup of the project from C:\Users\UserName\AndroidStudioProjects\YourProject to some other folder . Now delete the project.
  2. Launch Android Studio and click "Import Non-AndroidStudio Project (even if the project to be imported is an AndroidStudio project).
  3. 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.
  4. 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