简体   繁体   中英

The “android” command is deprecated after updating sdk. How to open sdk manager in Eclipse now?

After updating android sdk to 25.3.1, can't open sdk manager from Eclipse. Tried with SDK Manager.exe nothing happened. Then found on batch file:

The android command is no longer available. For manual SDK and AVD management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager

Then tried with tools/bin/sdkmanager, still nothing.

My java path is ok as it was working fine just before the update.

I'm using Android Studio but here is a command you might try (it works for me):

<64-bit jre home>\bin\java "-Dcom.android.sdkmanager.toolsdir=C:\programs\Android\android-sdk\tools" "-Dcom.android.sdkmanager.workdir=C:\programs\Android\Android Studio\jre\jre\bin" -classpath "lib\sdkmanager.jar;lib\swtmenubar.jar;lib\x86_64\swt.jar" com.android.sdkmanager.Main sdk

Replace the toolsdir and workdir VM params with your own values. Possibly you will need to locate tools like unpack200.exe in your sdk which are probably used when unpacking new components, and use that directory as workdir. Alternatively, just copy that directory from an Android Studio install.

You must execute it in your tools directory located in the android sdk, ie

C:\programs\Android\android-sdk\tools>

Then again, it's probably easiest and more future-proof to just install Android Studio and open the SDK manager from there ;)

I had this problem today, I used the command .\\android list target

in folder C:\\Users\\<your name>\\AppData\\Local\\Android\\sdk\\tools

from powershell left CTRL + left SHIFT + right-click > Open PowerShell window here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM