Starting the Android emulator in SDK tools, revisi

2019-01-04 08:49发布

I updated the Android SDK tools from revision 11 to revision 12, and the emulator now fails to start. When I try to run emulator.exe, I get:

invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information

The path to emulator.exe is C:\Program Files\Android\android-sdk\tools.

How do I fix it?

11条回答
啃猪蹄的小仙女
2楼-- · 2019-01-04 09:29

Moving your Android SDK folder to somewhere that the complete path will be without white spaces will fix the problem.

查看更多
\"骚年 ilove
3楼-- · 2019-01-04 09:30

I fixed this problem on Windows XP. Just cut from "C:\Program Files\Android\android-sdk" and paste content directory to "C:\Android\android-sdk". Set my system varaible 'ANDROID_HOME'="C:\Android\android-sdk". Set path to Android SDK in Eclipse as "C:\Android\android-sdk". That's it! Everything works fine.

查看更多
冷血范
4楼-- · 2019-01-04 09:34

As was previously suggested, it does seem to be caused by the fact that there is a space in the default installation path of the Android SDK: C:\Program Files\Android\android-sdk\

There are a couple of possible solves, though-

  1. move installation directories to paths that do not contains spaces (as already mentioned)...
  2. but simpler and possibly slightly less cumbersome is simply adjusting the path in Eclipse to use 8-dot-3 directory name(s). Since I'm running Win7, I have two Program Files directories, the second one being "Program Files (x86)" which is where the sdk installed. So the 8-dot-3 path is PROGRA~2. Thus, I simply changed the "SDK Location" value in the Android Preferences in Eclipse from C:\Program Files\Android\android-sdk\ to C:\PROGRA~2\Android\android-sdk\ and everything now works fine.

If you don't know the 8-dot-3 name of your desired path, just fire up a Command Prompt and execute "DIR /X"... the short name will be displayed next to each directory.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-01-04 09:37

I had a same problem when I setup r12. I found out this problem was caused by blank spaces in the path you setup android SDK. The solution is that you should move the folder of android SDK to a place without spaces, in your case : E:\andriod-sdk or D:\abc\xyz\android-sdk.

查看更多
We Are One
6楼-- · 2019-01-04 09:38

I got this problem just now, and I found a solution.

My path to the emulator-arm.exe is C:\Program Files\Android\android-sdk\tools. When I try emulator-arm @my_avd from the command line (my_avd is my Android Virtual Device name), it works.

查看更多
再贱就再见
7楼-- · 2019-01-04 09:39

Fixed in r13. Update your SDK Tools!

查看更多
登录 后发表回答