Failed to attach debugger to Android process in Android Studio 2.3.3

I have searched the internet and tried everything I came across but I cannot figure out what I am doing wrong. I am unable to attach a debugger to my Android process in Android Studio.

I created an app in Android Studio 2.3.3 on a virtual machine using VirtualBox and running Ubuntu 16.04.2. I installed an app on my device, Getac Data Logger and noticed that my app opens for a couple of seconds showing a blank white screen and then crashes. So, I tried to debug the app on my device to find the problem. When I click the Attach Debugger on Android icon, I can see my device as an option, however, when I select my device, the OK button is grayed out. I have no way to move forward with this process. Sometimes the warning "debug information may not be available, please close another application using ADB: Monitor, DDMS, Eclipse", but not every time.

Does anyone have any ideas as to what I am not seeing? Does this have anything to do with the limitations of running in a virtual machine?

Things I've tried:

  • Make sure I have allowed USB debugging on my device

  • Selecting all combinations of displaying all processes / auto / java / etc

  • Commands: adb kill-server, then adb start-server; adb kill-server then adb -P 5038 start-server

  • Waiting for my device to connect until I launch the debugger app

  • Building a debug variant

  • Adding android: debuggable = "true" to my app in my AndroidManifest.xml and then noticing that it wasn't necessary after creating the debug option and returning it

  • Disable and Re-enable ADB Integration with Tools / Android / ADB Integration Integration

  • Closing Android Studio and then opening it

  • Change adb port

  • Invalid cache / restart

  • Uninstall app, clean build, reinstall app

  • Installing MTP using the command: apt-get install mtpfs. It says that mtpfs is the newest version, but the Ubuntu error "Unable to open MTP device" [usb: 001,021] "is not always saved.

  • Revoking USB debugging authorization, exiting Android Studio and my VirtualBox, restarting everything and re-enabling.

NOTE:

  • I'm new to development (just over a year of experience in website development), completely new to app development (this is the first app I create), completely new to Android Studio (again, a very first app).

  • My device appears as an option in the debugger. It's just that the OK button is inactive and there is no way to move forward.

  • I do NOT have Eclipse or Monitor (and therefore not DDMS) running.

EDIT: I noticed that "# com.android.ddmlib - Rejected adb client connection" [numbers]: closed "appears multiple times in my terminal with multiple number combinations. Not sure what that means. Perhaps I am running DDMS? I thought it was something that goes through Monitor?

+3


source to share


1 answer


Disconnect your phone from your PC. Then plug it back in. In the pop-up window, make sure you set it to "Media Sync (MTP)"

.



0


source







All Articles