32

I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following:

Launching app on device. Waiting for process to come online...

and after some time I see the following: Timed out waiting for process to appear on 'device'...

I have attached a screenshot that shows the problem.

enter image description here

The problem started recently. I am using the latest version of Android studio (3.5.1) and a Google Pixel device running Android 10 but the problem happens on emulators and other devices running previous versions of Android. The problem also happens on two different computers, with different Android applications and devices - the common factor is Android studio. Finally, the problem seems to have started after I updated Android Studio to 3.5.

Does anyone know how to fix this problem? I have tried many things (clear cache, rebuild, invalidate and restart, etc) without success.

Any ideas?

a.p.
  • 3,248
  • 7
  • 30
  • 48
  • In my case I got the same result when launching instrumentation tests on either emulator and real device. The rest of colleagues are able to run them, so it has nothing to do with the project but probably with Android Studio. Running tests via terminal do work. Did you do progress on this topic, besides reverting to a previous version of AS? – Alex Barceló Nov 13 '19 at 09:30
  • I've had the issue of it taking 6 minutes to install...(after getting the timed out message). What I have done in the past is File->Invalidate caches/restart. – CodingFrog Oct 29 '20 at 11:08

12 Answers12

12

You mentioned that restarting Android Studio didn't work for you...but it worked for me...

File > Invalidate Caches / Restart... > Just Restart

Android Studio 3.6.2
Build #AI-192.7142.36.36.6308749, built on March 18, 2020
Eric
  • 16,397
  • 8
  • 68
  • 76
  • 1
    It looks like this is fixed in the latest Android Studio update, 3.6.2, among a few other bugs – a.p. Apr 10 '20 at 06:20
6

There is a bug in the recent Android Studio release. You can revert to previous version or test it from command line.

Xi 张熹
  • 10,492
  • 18
  • 58
  • 86
6

For me the problem was that I accidentally removed the Launch of the Default Activity in the "Run > Edit Configurations..." option.

Just insert the "Default Activity" under "Launch Options" and your application will run again on your device.

jschaefer
  • 71
  • 1
  • 3
3

For me, it took marking the build as "debuggable" in the application build.gradle file.

For example:

android {

    //...

    buildTypes {

        // ...

        releaseStaging {
            debuggable true // <- add this line
            signingConfig signingConfigs.release
            applicationIdSuffix ".releaseStaging"
            versionNameSuffix "-STAGING"
            matchingFallbacks = ['release']
        }
    }
}

Remember to remove this before building release APKs though!!!

sdgluck
  • 24,894
  • 8
  • 75
  • 90
3

Even if I faced the timed out issue in one plus and followed steps that fixed for me.

  1. Go to the respective app
  2. Hold for 3 sec > App info> permissions> allow for storage>.
  3. Next, go to adv settings> battery opt > check "Don't optimize.">
  4. Come back and scroll down > display over other apps> enable....

Hope this helps.

Alexandre B.
  • 5,387
  • 2
  • 17
  • 40
1

I managed to fix the problem by uninstalling Android studio, deleting all relevant files in the user folder (including gradle cached files) and installing the latest version of Android studio. The problem seems to have been fixed after several months. Note that I am now using Android Studio 4.1.

a.p.
  • 3,248
  • 7
  • 30
  • 48
0

Hey I had this same problem recently, I tried re-starting adb server but no luck, however when I uninstalled the APK present on my device. Then everything was back to normal.

When I tried to run it on a emulator which didn't have application already, it worked perfectly fine.

Hope this helps :) Thank You.

Shivam Sompura
  • 125
  • 1
  • 10
0

I tried most of the answers from here and on YouTube. What worked for me is updating my Android studio to the latest version; 4.0.

0

Everything was working fine for me, when I started getting the error described in this question. So I created and started using a different virtual device for the emulator, and it didn't have the problem.

John Gilmer
  • 831
  • 1
  • 11
  • 18
0

I was using debugging over Bluetooth.

Giving Location permission to the WearOS app on my phone solved the problem for me.

(Bluetooth scan access is restricted in the modern android versions unless fine Location permission is granted)

hououin
  • 1
  • 1
0

In case it can help someone... try one of the following:

  1. Make sure device is not connected the same time via data cable and wifi

2.If you are connecting through wifi, try to connect via data cable.

3.Check maybe your device has some component or anything maybe like fingerprint interfering with the connection.

-1

When these errors occur:

  • Message in Run
  • No communication with Run (stacktraces, System.out ...)
  • No restart button
  1. Install the newest Android Studio version
  2. Try on different virtual devices, some of them are glitched
Cactusroot
  • 1,019
  • 3
  • 16