Search code examples
androidandroid-studiologcatandroid-studio-3.0disconnect

V/FA: Inactivity, disconnecting from the service after successfully generating .apk


I have been compiling my Android app without problems for months. I am using Android Studio 3.4.1. I still can run the app. The problem is that after a few seconds (not even a minute for sure), I see this:

V/FA: Inactivity, disconnecting from the service

The app is executing but it does not report actions to Android Studio anymore. I see this:

enter image description here

But in the Android Studio logs, it seems as if the app was already stopped. No reports at all about what I am doing on the app. I can still stop the app if I press the stop button, and it responds to that though. But other than being able to stop the app, nothing is reported in the Android Studio logs.

I already tried the solution provided by Sohaib Aslam at V/FA: Inactivity, disconnecting from the service. It does not fix the problem for me. I tried restarting the computer, using File > Invalidate Caches / Restart..., connecting a physical phone to the laptop instead of running it from the Android Studio Emulator, and the result is always the same:

V/FA: Inactivity, disconnecting from the service

I cannot tell why this started to happen. I had been compiling my app correctly. The last thing I remember that I did was to use Build > Generate Signed Bundle / APK.... The .apk file was generated correctly. But then I found a bug and tried to debug the app again by using System.out.println() and Log.d(). The problem about V/FA: Inactivity, disconnecting from the service started to happen. I do not see how generating an .apk file could cause this problem. I have not found solutions online to this issue. Any ideas? Thank you.

UPDATE 1:

Some context of what happens before I see the line about disconnection for inactivity:

I/FIAM.Headless: Removing display event listener
D/EGL_emulation: eglMakeCurrent: 0xe773e460: ver 3 0 (tinfo 0xcae782d0)
D/EGL_emulation: eglMakeCurrent: 0xe773e460: ver 3 0 (tinfo 0xcae782d0)
V/FA: Inactivity, disconnecting from the service

Maybe this line about Removing display event listener is a good hint about what is causing the problem?


Solution

  • Very weird. My workaround was to test changes by displaying values of variables on elements of the graphical user interface.