Run Button is Disabled in Android Studio

前端 未结 18 853
无人及你
无人及你 2020-12-07 15:05

I can\'t click the run button. Does anyone know how to fix it?

\"Disabled

相关标签:
18条回答
  • 2020-12-07 15:50

    if you're importing an eclipse project to android studio, you'll also encounter the same issue as above. Double Check if grade>app has apply plugin: 'com.android.application' on the top as sometimes android studio imports it as a library.

    0 讨论(0)
  • 2020-12-07 15:55
    • Select the project view in the android studio.
    • Remove all gradle folders.
    • Restart the android studio.

    This will work.

    The issue is happening since the gradle was configured for an android studio in another machine and the files pushed on the git and are using in your studio.

    After removing these gradle files and restarting the studio, the studio will generate gradle files for your system. This will solve the issue.

    0 讨论(0)
  • 2020-12-07 15:55

    I opened the wrong folder.... Verify is your root folder in Android studio has the build.gradle file.

    0 讨论(0)
  • 2020-12-07 15:56

    Click Run on the menu and then Edit Configurations... then click on Android Application on the left and click the + button. Choose Android Application from the pop-up menu. Then pick the module (its normally app or something like that). Then click apply and ok.

    If you have more errors after that, try to re-import the project in Android Studio.

    0 讨论(0)
  • 2020-12-07 15:58

    Just click the dropdown button on left side of RUN button (in your image the dropdown which is in red box) select 'app' option from that and RUN button will be enabled.

    Please refer below screenshot.

    0 讨论(0)
  • 2020-12-07 15:58

    just to go File -> Sync Project with Gradle files then it solves problem.

    0 讨论(0)
提交回复
热议问题