DDMS throwing ADB error since SDK API 9 upgrade

14,255

Solution 1

It seems that adb.exe is now in the SDK's platform-tools folder. I had to add the platform-tools folder to my PATH in my Environment Variables.

Solution 2

I tried to upgrade my perfectly working Android dev system yesterday with the new 2.3 SDK and associated ADT. After the upgrade, I couldn't get Eclipse to compile my project correctly, nor could I access the Android SDK and AVD Manager from Eclipse. Eclipse seems to have lost track of where the Android SDK was installed. I would give it the name of the folder, but then it could come back saying it couldn't find .../tools/adb.exe. Yes I know adb.exe moved. But notice that the error was looking for it in the old spot. It's like I didn't have the new ADT, but I checked and rechecked and I did. I'm thinking that the new ADT didn't install correctly for some reason, and/or I wasn't checking it's version properly.

When I searched around for a solution, everyone pointed out that adb moved and that the classpath needed to change. But there isn't really a relevant classpath in this situation. There is just a path to the Android SDK that needs to be set in Eclipse. I even tried the trick were I copied adb.exe back to the tools folder. At that point, Eclipse could find the Android SDK, but then some other problem that crept up so I gave up on that hole.

Anyway, I ended up blowing away my eclipse and Android SDK folders and starting over. Now it works fine. I'm sure there's a better solution, but I was sick of messing with it.

I'm now 2 for 4 on using Android SDK and AVD Manager to do an upgrade.

Hope this helps someone.

Update: Upon further review, I seem to have my stackoverflow topics mixed up since the OP never mentioned Eclipse.

Share:
14,255
Bryan Denny
Author by

Bryan Denny

I am a senior web developer who specializes in .NET, C#, SQL, MVC, Web Forms, Web API and WCF. I design and maintain large web applications from the UI front-end to the code and database back-end. I also have experience developing and publishing Java Android applications. For more information, check out my resume and portfolio website: http://www.bryandenny.com

Updated on June 11, 2022

Comments

  • Bryan Denny
    Bryan Denny almost 2 years

    I upgraded to Gingerbreak 2.3 SDK today and started receiving this error when I try to run DDMS:

    Failed to get adb version: Cannot run program "adb": CreateProcess error=2, The system cannot find the file specified.

    How can I fix this? Running Windows 7, 64bit.

  • Vik
    Vik over 13 years
    Isn't the question about DDMS.bat ? How do you run it without using Eclipse's DDMS perspective ? It gives me the same error after API 9 update. EDIT : Oops. Bryan, you have asked the question. Didn't notice it. Will set the adb path and will let know if if fixes in my machine. [FIXED] Bryan's solution fixes it ! Add the android\platform-tools\ to PATH. In my case, it was C:\eclipse\android\platform-tools\
  • Bryan Denny
    Bryan Denny over 13 years
    I've always ran DDMS by going to the Android SDK directory, Tools, DDMS.bat. The problem is they moved the adb.exe around so DDMS couldn't find it unless you add it globally.
  • Vik
    Vik over 13 years
    Yup. I used to do the same thing. Eclipse's DDMS perspective seemed to work fine even after the update and \tools\ddms.bat did break. Thanks ! It's fixed now.
  • Amos
    Amos about 13 years
    I'd updated my Android-SDK using the Android tool and was having a similar problem. I had to update Eclipse's software packages via the Help Menu - Software Updates selection. I then chose to update the ADT package and the other Android related one after this the original error message had vanished.