Why does the Android emulator report “unknown virtual device”, when the device is in my user directory?

后端 未结 4 1953
长发绾君心
长发绾君心 2021-01-31 19:30

I installed all the prerequisites for Android development. I created a virtual device through Eclipse and tried to run the Hello World sample application in that device. I recei

4条回答
  •  [愿得一人]
    2021-01-31 20:00

    Android Virtual Device Tool

    The Virtual Device tool in the SDK Manager creates virtual devices in your user profile directory... in this case a secondary drive

    D:\Users\anthony\.android

    But, the emulator tries to load virtual device images from the system drive

    C:\Users\anthony\.android

    Directory Junction

    There are two workarounds. First, you can create a directory hard-link (or junction) from the system drive android folder to the one in your user profile. In Windows 7, you can use the following command

    mklink /J C:\Users\anthony\.android D:\Users\anthony\.android

    Android Home

    The Android SDK Manager and emulator can use an environment variable ANDROID_SDK_HOME to identify the location of the .android directory. Set a user or environment variable

    ANDROID_SDK_HOME = 'D:\Users\anthony'

提交回复
热议问题