Android Studio can't find runner
Asked Answered
I

3

21

I cloned a project from git and built it in android studio without any problems but I don't have (Run app) in android studio and also when I run run-android I get this error:

Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`

but I can run my emulator from AVD manager! I did every solutions that I found with search but they didn't work for me

enter image description here

Interstratify answered 2/10, 2021 at 8:48 Comment(4)
What repo did you clone?Cupronickel
my company application, this is a private projectInterstratify
In that case I can just guess what‘s wrong. Maybe there is in local.properties a SDK path defined which is not on your system.Cupronickel
thanks, it is a correct address, I can build my project and I get BUILD SUCCESSFUL also I can run my emulator from AVD manager, but Run app is disable!Interstratify
L
50

For me, the reason was one of the following:

  • Gradle sync was in progress
  • Gradle sync had failed
  • Gradle build.gradle[.kts] had been modified

For the last two cases, go to your top-level or app build file and click Try again or Sync button on the notification shown at the top of the file.

You could also just try to sync the IDE with Gradle with either of these buttons:

Syncing IDE with Gradle

Lamarre answered 23/1, 2022 at 7:30 Comment(1)
Similar issue for me, I made a change to the build.gradle file and failed to click Sync. Once I did, the Run app button (green triangle) became enabled again.Descry
D
5

I faced a similar error. I was trying to import a built apk to profile it and ran into the scenario where the run button was grayed out.

Ultimately what worked. I went to File > Manage IDE Settings > Restore default settings.. and redid the android studio setup. Note: Doing this will RESET the entire Android Studio and redownload everything.

Disulfide answered 18/10, 2021 at 18:45 Comment(0)
A
0

1- Give the SDK path (to find the emulator path), Usually in User\YourUsername\AppData (is hidden by default)\Local\Android\Sdk. in File->Project structure, SDK location. Also the Java\Jdk path for (JDKs) and the path "...java\util\concurrent" exist Do not reset the IDE Settings (because you need to reinstall a lot of things and it will not solve) 2 possibility - from File->Setting->Tools->Emulator to check the Launch in a tool window 3 possibility -

Andros answered 28/2, 2022 at 10:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.