Run Button Grayed out: Android Studio

Why is the run button always grayed out in android studio after I had some errors.
I need to reboot my android studio every time to run it again. I am sure that I am missing something 😛

Run Bar

  • Is there a way to have an Android process produce a heap dump on an OutOfMemoryError?
  • Where to report device-specific bugs to Samsung?
  • Send Email Intent
  • How to add an item to a menu group in NavigationView
  • How to get Next button on android softkeyboard in place of Go Button in phonegap
  • Android List with section headers
  • Run Button

    I also get an error right now 🙂

    Already disposed: Project (Disposed): Already disposed: Project (Disposed)
    java.lang.AssertionError: Already disposed: Project (Disposed)
        at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:186)
        at com.intellij.psi.PsiDocumentManager.getInstance(PsiDocumentManager.java:41)
        at com.intellij.psi.SingleRootFileViewProvider.getLastCommittedText(SingleRootFileViewProvider.java:521)
        at com.intellij.psi.SingleRootFileViewProvider.access$400(SingleRootFileViewProvider.java:63)
        at com.intellij.psi.SingleRootFileViewProvider$DocumentContent.getText(SingleRootFileViewProvider.java:537)
        at com.intellij.psi.SingleRootFileViewProvider.getContents(SingleRootFileViewProvider.java:347)
        at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:199)
        at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:776)
        at com.intellij.psi.impl.source.PsiFileImpl.getFirstChild(PsiFileImpl.java:787)
        at com.intellij.psi.impl.source.xml.XmlFileImpl.getDocument(XmlFileImpl.java:47)
        at com.intellij.psi.impl.source.xml.XmlFileImpl.getRootTag(XmlFileImpl.java:58)
        at com.android.tools.idea.rendering.LocalResourceRepository.getViewTag(LocalResourceRepository.java:323)
        at org.jetbrains.android.inspections.lint.IntellijViewTypeDetector.getViewTags(IntellijViewTypeDetector.java:42)
        at com.android.tools.lint.checks.ViewTypeDetector.visitMethod(ViewTypeDetector.java:213)
        at com.android.tools.lint.client.api.JavaVisitor$DelegatingJavaVisitor.visitMethodInvocation(JavaVisitor.java:1189)
        at lombok.ast.MethodInvocation.accept(MethodInvocation.java:114)
        at lombok.ast.Cast.accept(Cast.java:94)
        at lombok.ast.BinaryExpression.accept(BinaryExpression.java:131)
        at lombok.ast.ExpressionStatement.accept(ExpressionStatement.java:63)
        at lombok.ast.Block.accept(Block.java:106)
        at lombok.ast.MethodDeclaration.accept(MethodDeclaration.java:240)
        at lombok.ast.NormalTypeBody.accept(NormalTypeBody.java:57)
        at lombok.ast.ClassDeclaration.accept(ClassDeclaration.java:239)
        at lombok.ast.CompilationUnit.accept(CompilationUnit.java:83)
        at com.android.tools.lint.client.api.JavaVisitor.visitFile(JavaVisitor.java:217)
        at com.android.tools.lint.client.api.LintDriver.checkIndividualJavaFiles(LintDriver.java:1652)
        at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:986)
        at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:858)
        at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:425)
        at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:369)
        at org.jetbrains.android.inspections.lint.AndroidLintExternalAnnotator.doAnnotate(AndroidLintExternalAnnotator.java:146)
        at org.jetbrains.android.inspections.lint.AndroidLintExternalAnnotator.doAnnotate(AndroidLintExternalAnnotator.java:56)
        at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:222)
        at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$400(ExternalToolPass.java:43)
        at com.intellij.codeInsight.daemon.impl.ExternalToolPass$2.run(ExternalToolPass.java:133)
        at com.intellij.codeInsight.daemon.impl.ExternalToolPass$3.run(ExternalToolPass.java:170)
        at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
        at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
        at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
        at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
        at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
        at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
        at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
        at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298)
        at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295)
        at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110)
        at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
        at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107)
        at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104)
        at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215)
        at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
        at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
        at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
    

    Related posts:

    Android Studio build fails with “Task '' not found in root project &...
    RxJava: How to convert List of objects to List of another objects
    VideoView in a live wallpaper?
    Android httpPost with parameters and file
    How can I get a “done” button in softkeyboard?
    import android.support.wearable cannot be resolved
  • How to capture the onSwipeDown event on google glass using a native app?
  • Android Emulator doesn't start in MacOS 10.10
  • Does Google Cloud Messaging (GCM) work with Kindle Fire?
  • Android : Call activity of another application
  • Android SQLite database: slow insertion
  • SAX parser vs XMLPull parser
  • 9 Solutions collect form web for “Run Button Grayed out: Android Studio”

    You should initially configure the application.
    Click the edit configuration in the combo box left to run button then:
    enter image description here

    If you’ve made major changes to your project structure, it sometimes takes restarting Android Studio to regain the ability to Run your project. Worked for me.

    After an updated of Android studio this week, it worked 🙂

    Happened to me when my module settings weren’t right. Go to module settings by right clicking the project in the left pane then make sure the target is set to android-23 or whatever version you want

    If you not able to launch android app without activity then perform below mention steps.

    1. Open Edit Configuration.

    2. Select your application and checked do not launch activity.

    After an updated of android studio or major changes to your project structure
    you need to restart android studio and for the first time press run from the dropdown menu

    For me, it was an issue with the app module which was not selected after Android Studio update. Select the app module in the combo box left of the run button.

    There are many solution related to this problem …

    1. Goto setting->plugins->uncheck the red one’s and apply.

      Then again mark them (check them ) and apply .

      Restart your android studio , now you are good to go.

    //done

    Sometimes it happens with no reason. If there is definitely no problem with “Run configuration”, restarting Android Studio usually helps.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.