46

I just launched the Android device monitor for the first time on OSX but it freezes and I am not able to click anywhere, it just does not respond to any mouse or keyboard input.

I think it's downloading, I have very good internet speed, but it's downloading very slowly. I tried to download a song and it downloaded 5 MB in 30 seconds, and for this case it's downloading 2 MB in 5-10 min and its size is about 540 MB, so please assist me with what should I do to download fast? Any help would be appreciated.

Is there any manual way to download and connect it to Android Studio?

Any way to make it respond to mouse clicks?

3
  • Did you mean file transfer between the device and mac?
    – Stanley Ko
    Nov 3, 2017 at 7:23
  • i just want to pull db file from emulator Nov 3, 2017 at 7:25
  • 1
    It just freezes for me too..not sure how to resolve it.. It does not respond to any mouse events.. Connecting to any device, it shows as connected, but just not responding to anything..
    – Awesome
    Nov 19, 2017 at 9:44

8 Answers 8

30

Finally Fixed!!!. This problem occured to me when i was using jdk-8u161-macosx-x64, downgrading the jdk from jdk-8u161-macosx-x64 to jdk-8u151-macosx-x64 solved the issue for me.

  1. Remove your existing java jdk by running this command sudo rm -rf /Library/Java/*
  2. Download the jdk-8u151-macosx-x64 from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html you need to sign up to oracle to download previous versions of jdk.
  3. intall jdk-8u151-macosx-x64 by just following the instructions.
4
  • 1
    Thanks, this worked! Versions u162 and u152 both didn't work, but u151 did the trick.
    – frin
    Mar 13, 2018 at 14:44
  • That download page is not easy to find without your URL, and the downgrade worked!
    – Jerry101
    Mar 19, 2018 at 2:02
  • Thanks! it worked with Android Studio 3.4.2 and that dk 8u151
    – Takatalvi
    Jul 16, 2019 at 20:24
  • This solution used to work out perfectly for me on Catalina, but after upgrading to Big Sur it will freeze again. Any ideas?
    – mbakulin
    Jan 6, 2021 at 13:58
18

Alternatively you can keep latest jdk and update swt used by monitor:

get updated swt: https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/swt-4.7.1a-cocoa-macosx-x86_64.zip

unzip somewhere

copy extracted swt.jar over lib/monitor-x86_64/plugins/org.eclipse.swt.cocoa.macosx.x86_64_3.100.1.v4236b.jar

4
  • This is the best and easiest solution! Thanks
    – Dieskim
    Nov 7, 2018 at 3:52
  • Worked for me, seems easier than other options, thanks! Nov 7, 2018 at 13:16
  • I hate that this was still necessary as of May 2019 but grateful for the advice. Note that this means the unpacked swt.jar is being renamed as an earlier version, which leaves me feeling a bit slimy.
    – Andy Dent
    May 15, 2019 at 9:10
  • It still is necesary as of June 2019.
    – Juanu
    Jun 18, 2019 at 16:52
18

While other answers are correct that the solution is to use an old version of the JDK, just replacing the latest JDK was not an option for me (and should not be for you, either!). To get monitor working with an older Java version installed along the newest one, do the following:

  1. Find your android SDK location
  2. Go to <android-sdk>/tools/libs/monitor-x86_64/
  3. Find the monitor.app application and right click on it, select "Show Package Contents"
  4. Expand Contents and edit Info.plist in a text editor
  5. Look for the <key>Eclipse</Key> section
  6. Uncomment one of the <string>-vm</string>... lines and point it to the 1.8 151 JDK, like so:

     <string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java</string>
    
  7. Save the file
  8. Start the app and it should work now!

Remember that you'll have to do this again when the tools are updated!

1
  • this helped me so much. thank's Feb 27, 2022 at 11:53
11

Finally issue resolved. It was JDK java version.

Changed it to a level below and its working now.

java.version=1.8.0_152-ea --> not supported it seems

java.version=1.8.0_151 --> working fine with it

1
  • 1
    I tried 1.8.0_161, but getting an empty window that is not responding. Downgrading to 1.8.0_151 works!
    – shiouming
    Jan 21, 2018 at 4:40
8

With android studio 3.0, you can use Device File Explorer. Tab button is right bottom side of the screen.

enter image description here

You can upload your file by right click - select upload. enter image description here

3
  • can we also pull db file form their and also insert any file or song to emulator? Nov 3, 2017 at 7:27
  • Yes, you can copy file to emulator. Right click the folder you want to copy to, and select "Upload".
    – Stanley Ko
    Nov 3, 2017 at 7:35
  • ok great , its helped me . not what i required , but close . thanx Nov 3, 2017 at 7:45
4

This solution works: https://stackoverflow.com/a/51212642/4903059

Alternatively you can keep latest jdk and update swt used by monitor:

get updated swt: https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/swt-4.7.1a-cocoa-macosx-x86_64.zip

unzip somewhere

copy extracted swt.jar over lib/monitor-x86_64/plugins/org.eclipse.swt.cocoa.macosx.x86_64_3.100.1.v4236b.jar

But I had to download a newer swt when using Android Studio 4.0 on macOS Catalina 10.15.5:

https://archive.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/download.php?dropFile=swt-4.9-cocoa-macosx-x86_64.zip

0

This tends to work for me but turn off WiFi on all the devices on your network. Also clear your cache.

4
  • Not connected to any wifi.. Also tried a fresh install of Android Studio.. no luck..
    – Awesome
    Nov 19, 2017 at 14:26
  • Try saving all the other stuff to a usb or a disk and reset. Download it again Nov 19, 2017 at 14:59
  • As I said, I created new mac user, installed fresh android studio.. still not working.. It just does not respond to mouse or keyboard events.. though it shows connected when any phone is connected via usb..
    – Awesome
    Nov 19, 2017 at 17:39
  • Man, the problem is in JDK. Read the answers before and the question itself before say something. Just a trick before get negative votes. You can search in other forums too. Sorry about any negative critics... good luck! Feb 4, 2020 at 1:10
0

If you just want to copy files from your local computer to simulator, I think you can use the adb command to achive this purpose.

Here is the sample command to copy your folder / file to the simuator's sdcard

adb push myFolder/ /sdcard/myFolder

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.