Sunday, May 12, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1256  / 1 Year ago, thu, january 5, 2023, 6:33:42

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?


More From » command-line

 Answers
0

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

[#14277] Friday, January 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tialmes

Total Points: 14
Total Questions: 108
Total Answers: 102

Location: Oman
Member since Thu, Jun 16, 2022
2 Years ago
;