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

后端 未结 4 1959
长发绾君心
长发绾君心 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 19:56

    If you find:

    emulator: ERROR: unknown virtual device name: 'Android21Device'
    emulator: could not find virtual device named 'Android21Device'`

    Just change your environment variables in the path in which your .android is found.

    1. create your avd name such as hello in android sdk and avd manager
    2. start launch then if you find the error like above
    3. open the details
    4. see the path and copy the path example of path C:\Users\\Contacts.android\avd\hello.avd
    5. open your variable environment by start->computer>right click>properties>advance system setting>variable environment> system variable>
    6. see in the system variable where the variable is PATH then edit
    7. click the variable value then add the C:\Users\\Contacts.android\avd\hello.avd preceded by a semicolon(;). For example: C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Users\\Contacts\.android\avd\hello.avd
    8. ok.then restart your computer...
    9. open eclipse then start your avd again...

提交回复
热议问题