0

While installing the Android Emulator (SDK) by following this tutorial and applying these commands:

$ cd /opt
$ wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
$ sudo tar -zxvf android-sdk_r24.4.1-linux.tgz
$ cd /android-sdk-linux/tools
$ ./android

I got past the first two commands fine then when entering the third command:

$ cd /android-sdk-linux/tools

I got this error:

bash: cd: /android-sdk-linux/tools: No such file or directory

How can I fix the problem?

Zanna
  • 70,465
  • With reference to your other question (not being able to find the SDK after step 6 in your tutorial) I edited my answer slightly - I think you just need to run android again. Please comment if not, and we'll work it out (the tutorial is quite unclear I think) – Zanna Jul 29 '16 at 13:54
  • yes i am still having so many issues, it seems the more i try to follow the advice the more mistakes i make...i'm sorry for being such a noob but i'm honestly trying my best to problem solve, any ideas of what i should provide you with to help you make suggestions? – Inigo Montoya Jul 29 '16 at 21:31
  • don't worry :) what happens when you run the android file again? (see the end of my answer) – Zanna Jul 29 '16 at 21:37
  • this is what i get - Bash: ./android: No such file or directory – Inigo Montoya Jul 29 '16 at 22:01
  • did you cd /opt/android-sdk-linux/tools first? – Zanna Jul 29 '16 at 22:02

2 Answers2

1

the command is incorrect. When you have completed the previous commands you are still in the directory /opt and android-sdk-linux is a subdirectory of it, and tools is a subdirectory of android-sdk-linux, so you cd to it like this:

cd android-sdk-linux/tools

without the leading /, which signifies the root directory right at the top. You can see that /android-sdk-linux/toolsdoes not exist if you ls the root directory

ls /

see? no android-sdk-linux here. But you see opt which is where you were before... That's why its location is /opt

If you are not in the /opt directory, (for example you opened a new terminal) you need to use the full path

cd /opt/android-sdk-linux/tools

The directory may possibly have a different name so do

cd /opt; ls

and you will see, if not exactly, then something like android-sdk-linux use the correct name:

cd android-sdk-linux; ls

now you should see tools

cd tools

and now you can run your executable.

Note: If you already closed it after step 6, to progress to step 7 in the tutorial, you should repeat the last two steps:

cd /opt/android-sdk-linux/tools
./android
Zanna
  • 70,465
0

Just do a ls to see what folders are there in the directory and then replace that /android-sdk-linux/tools with something like /android-sdk_r24.4.1-linux/tools change that android-sdk_r24.4.1-linux according to the folder you find upon doing a ls whose name probably will begining with android.

Further Note: Here cd means change directory just like you normally do by double clicking on the folder icon , thats just the command line way. If you are using the default terminal than you can just type cd and drag that folder from file manager to the terminal and press enter to enter it. Thats just a simple trick which can help you a lot!

Cheers

hellozee
  • 419