I can't click the run button. Does anyone know how to fix it?
This question is related to
android
android-studio
It was quite silly for me, I just opened the Run > Run Configurations window everything seemed to be fine there, I didn't change anything, when I closed the window the button was enabled.
Above answer didn't work for me, just do click File -> Invalidate/cache -> Invalidate and Restart.
just to go File -> Sync Project with Gradle files then it solves problem.
When creating the Run Configuration
, the dropdown for Module had only <no module>
for me. Invoking menu File -> Sync Project with Gradle Files
added app
to the dropdown for Module. Then the Run button became enabled.
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.
I'm using Linux where I had a symlink in my home folder pointing to a folder containing the Android Studio projects. Loading a project using the symlink failed, loading a project from the folder where the symlink is pointing to worked!
The above answer didn't work for me, instead closing the project and restaring the AS IDE worked for me.
I opened the wrong folder.... Verify is your root folder in Android studio has the build.gradle file.
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.
Build
->Clean Project
make the run button enable again in my case
You have to reconfigure the FlutterSDK path in Android Studio: Go to Setting -> Language & Frameworks -> Flutter and set the path to Flutter SDK
If you have changed jdk version then go to File->Project Structure->Select SDK Location from left bar->update JDK Location in editbar in right bar.
My solution was to go to that multiselect button, then "Edit Configurations" -> Go to "+" and select the module (in this case it would be an app if you do not have a multiproject -> then apply and OK
for flutter project, if the run button is disabled then you have to
tools>> flutter>> flutter packages get >>enter your flutter sdk path >>finish
This should solve your problem...
Source: Stackoverflow.com