4

I run a build on a ubuntu 16.04 server with no xorg or GUI of any kind, and I am trying to run a simulator on it. this is what I get on the console

$ /opt/android//tools/emulator -engine classic -ports 5688,5689 -report-console tcp:5815,max=60 -avd Nexus_5X_API_25 -no-snapshot-load -no-snapshot-save -no-window
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
Build was aborted

How do I set the ANDROID_SDK_ROOT in ubuntu?

Moses Liao GZ
  • 1,556
  • 5
  • 20
  • 45

3 Answers3

7

export ANDROID_SDK_ROOT=/usr/lib/android-sdk in your ~/.bashrc or /etc/profile

Diwakar
  • 318
  • 2
  • 8
ph4n70m
  • 300
  • 2
  • 6
0

I have Ubuntu 20.04, and for me the path is /root/Android/Sdk.

export ANDROID_SDK_ROOT=/root/Android/Sdk
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
vikas
  • 61
  • 6
-9

Type in terminal,

echo $ANDROID_SDK_ROOT

this command will display ANDROID_SDK_ROOT variable path.

IF NOTHING APPEARS THEN SET IT WITH THIS

export ANDROID_SDK_ROOT = yourandroidsdkpath

For displaying follow first command.

You can refer in this topic

Sinh Phan
  • 1,180
  • 3
  • 16
  • 36