Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Device Monitor not opening in Ubuntu 17.10

When I open Android Device monitor, I am getting the following error:

An error has occurred. See the log file
/home/omkar/Android/Sdk/tools/lib/monitor-x86_64/configuration/1509852867579.log.

I have already tried:

  1. Running Android studio with "sudo"/ root user permission.
  2. Reinstalling Android SDK.

My configuration :

  1. Android Studio 3.0
  2. Android SDK API version 27.
  3. Ubuntu 17.10 Gnome

I am attaching the pastebin link for the logs in the question. Logs Link : https://pastebin.com/cje8fkgY

like image 612
Omkar Nath Singh Avatar asked Nov 05 '17 03:11

Omkar Nath Singh


1 Answers

While Android Studio brings its own Java version with it, the (now mostly deprecated) Android Device Monitor (ADM) is dependent on the Java version installed on your machine. From other error reports around the web, it seems that ADM needs Java 8 (here, for example). This is also where our machines differ from each other. As I noted in a comment above, I am, too, on Ubuntu 17.10, Android Sdk 27 and Android Studio 3.0, however, I have Java 8 installed, and ADM runs fine.

Therefore I would suggest you to add Java 8 to your machine and make it the default version. On Ubuntu, you can do this like that:

sudo add-apt-repository ppa:webupd8team/java // only necessary if repository not yet added
sudo apt-get update                          // only necessary if repository not yet added

sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
like image 155
kalabalik Avatar answered Oct 06 '22 09:10

kalabalik