Cannot run adb command

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Cannot run adb command

Postby htmldroid » Sat Jul 30, 2011 8:34 pm

Hey folks!

I have been very excited about the fact that one can make Android apps using HTML, CSS, and JavaScript. Therefore I bought the following book: "O'Reilly - Building Android Apps with HTML, CSS, and JavaScript" by Jonathan Stark. Since then I have been trying to get the AndroidSDK/PhoneGap to work. I've been trying to do so for almost an entire week now. I did try on a MacBook Pro with Mac OS X Lion, and right now I sit in front of a IBM ThinkPad with openSUSE 11.4. Both times I failed at exactly the same point! Why is it so hard to make it work? I have been closely following Jonathan Stark's directions... So here's what I did.

1. I downloaded the Android SDK (android-sdk_r12-linux_x86.tgz), extracted it on my desktop, and renamed the folder - for simplicity's sake - to "Android".
2. Then I opened up "Terminal" and navigated to the "tools" directory, which is located within the "Android" folder: cd ~/Desktop/Android/tools/
3. In order to start the "Android SDK and AVD Manager" I typed in the following: ./android
4. The "Android SDK and AVD Manager" started properly and I successfully installed the whole "Android Repository". I did not install "Third-party Add-Ons".
5. After quitting the "Android SDK and AVD Manager as well as "Terminal", I downloaded Jonathan Stark's version of PhoneGap (jonathanstark-phonegap-android-0.9.0-79-ge6b114c.zip) from https://github.com/jonathanstark/phonegap-android, extracted it on my desktop, and renamed the folder - for simplicity's sake - to "PhoneGap".
6. Next I tried to configure my PATH variable - whatever that is... Neither on Mac nor on Linux the following command worked: ls -l ~/.bash_profile Since there apparently was "no such file or directory", I created one. I am totally new to Linux, therefore I did not know how to create a file using "Terminal". So I navigated in my home directory using "Dolphin", right-clicked "Create New" > "HTML File". I then renamed this empty HTML file to ".bash_profile". It immediately became invisible.
7. However, now the file existed. At least I think that. I could now use the following command to edit it using the "Nano-Editor", which was pre-installed on Mac OS X (not so on openSUSE 11.4): nano ~/.bash_profile
8. I added the following line of code: PATH=$PATH:~/Desktop/Android/tools:~/Desktop/PhoneGap/bin
9. I saved changes and quit everything.

At this point, Stark tells the reader to run the following two commands in a new "Terminal" - If they work, proceed, if not, get help. At first, I run android. I opens up the "Android SDK and AVD Manager" once again. So far so good. Next, I run adb. On Mac OS X simply nothing happened, on openSUSE I get the following information: "If 'adb' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf adb". On Mac OS X, I simply ignored the fact that adb was not working, therefore I had trouble later on. So this time, I want to do it right. If you have any idea what I've been doing wrong - pleeaase, tell me!

Thank you very much in advance!
Lucas
htmldroid
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jul 30, 2011 8:21 pm

Top

Re: Cannot run adb command

Postby techkanika » Mon Aug 08, 2011 2:56 pm

Hi,

instead of using tool in your path try to use "platform-tools", because pathnis updates in latest releases. I hope it will resolve your problem.

kanika
Thanks
Kanika Rakheja
User avatar
techkanika
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Fri May 28, 2010 7:49 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 7 guests