5

I just switched from Eclipse to Android Studio. For what I saw since now the new IDE has a lot more features than Eclipse, and I like using the new IDE for my app development work.

I just can't understand one thing: in Eclipse, there is the very useful DDMS perspective, from where you read Logcat and do a lot of other things, like using the very useful dump view hierarchy function, which allows you to take a dump of the UI and inspect it to understand what is shown where in your layout.

I'm not seeing nothing similar in Android Studio, and after making a lot of research it seem that the only way you have to do this is opening the Android device monitor from the "Tools" menu.

But doing this way the ADB connection get broken, because it is being used by Android Studio, and Android Device Monitor wants to use it. The result is that if you are debugging your app you can't open android device monitor unless you want to lose your debug status.

I think this is not acceptable and I'm sure there must be some better way to use Android Device Monitor tools together with Android, is that possible?

Thank you

EpicPandaForce
  • 79,669
  • 27
  • 256
  • 428
Apperside
  • 3,542
  • 2
  • 38
  • 65

5 Answers5

12

Actually I found a solution, I don't know if it is the best way (I keep thinking that android studio MUST integrate device monitor in a better way )

As stated in the question, starting device monitor from the menu tools causes android studio disconnect the device, but if you open the android studio's built in terminal (View > Tool Windows > terminal) and just type "monitor" it starts device monitor without detaching the device from android studio (you will get a warning on device monitor saying that there was a problem attaching the debugger, but don't care about that)

hope this will help some one

Apperside
  • 3,542
  • 2
  • 38
  • 65
  • 1
    I didn't think about just typing "monitor" in the console. That is a very good tip! – miva2 Apr 16 '15 at 08:22
  • It is integrated in a better way, just click on the Green Android in the Toolbar or on: Tools->Android->Android Device Monitor – sweisgerber.dev Apr 16 '15 at 09:46
  • as I sayid in the question itself, doing this way (in my case) the device get detached from android studio. For a better integration I mean something like DDMS perspective in eclipse that allow you to remain in the IDE instead of the need of switching on another application – Apperside Apr 16 '15 at 09:58
  • I don't think that is possible right now. Suggest it to google! :) – miva2 Apr 16 '15 at 11:23
  • Thank you! That's it! I've spent a whole day trying to get the monitor working for my project. This worked even though all the debug or monitor buttons in Android Studio are disabled for some reason (because project is using Gradle?). Finally I can find out why my app is crashing on launch. – user1029978 May 20 '16 at 06:35
  • You can launch the monitor from file explorer: [SDK_PATH]\tools\monitor.bat – wiz Sep 11 '16 at 09:42
8

There are several ways you can find the DDMS tool using android studio. Eclipse is not needed for that as the tool is a separate program that comes with the android SDK.

  • Click on the Android Device Monitor Icon in the toolbar in Android Studioenter image description here
  • Open the monitor.bat file (on a windows machine, this is located in [path-to-sdk]/sdk/tools)
  • Type monitor in the terminal in Android Studio or in any command prompt. (thanks SimonVeloper)
  • Open it via the tools menu. Tools->Android->Android Device Monitor (thanks sebweisgerber)enter image description here

This will open the DDMS tool and will automatically connect to connected devices.

Normally you will be able to view your logcat output through this tool and not in android studio anymore. If this doesn't work for you make sure your devices is properly connected and restart the tool.

miva2
  • 2,111
  • 25
  • 34
  • This is the better answer, not the marked one. The menu bar must be activated for it to work, Alternative: Tools->Android->Android Device Monitor – sweisgerber.dev Apr 16 '15 at 09:47
  • 1
    as I sayid in the question itself, doing this way (in my case) the device get detached from android studio. For a better integration I mean something like DDMS perspective in eclipse that allow you to remain in the IDE instead of the need of switching on another application – Apperside Apr 16 '15 at 09:58
  • Thanks sebweisgerber, I added it to my answer. SimonVeloper, sorry, I thought your DDMS gets disconnected. So you want the same thing but integrated in the Android Studio IDE? Well the current solution is basically the same except that it opens in a new window. You still get the same information, you don't lose anything. All debugging is also available from the tool. – miva2 Apr 16 '15 at 10:14
4

To open the Android device monitor simultaneously with Adb, Run the montior through the command prompt instead of visting to the Tools->Android->Android device monitor

To run via the Command line interface navigate to the :

Android/Sdk/tools/ and then run the monitor (for linux run -> sudo ./monitor)

Aman Kumar Gupta
  • 2,640
  • 20
  • 18
0

Android studio ,Android device monitor opens but you cannot display Logcat or device another functionality,Just go to your android studio tools option tick Enable ADB integration then you can open other ADM screen.This worked for me.

shadrack Mwangi
  • 785
  • 6
  • 14
Ganesh Giri
  • 1,135
  • 11
  • 18
0
I faced problem in android device monitor . I could not find file explorer menu , device list in android device monitor so i 
deleted hidden  *.android* folder in the home directory in linux using the  following command:

`$ sudo -r ./android`

After deleting this hidden folder your android device monitor will be set to default state.
ranojan
  • 819
  • 8
  • 11