简体   繁体   English

Android Studio-无虚拟设备

[英]Android Studio - no Virtual Device

I'm trying to run my new Project in Android Studio. 我正在尝试在Android Studio中运行新项目。 I want to run it on emulator. 我想在模拟器上运行它。 I created the new virtual device but Android Studio doesn't see this device. 我创建了新的虚拟设备,但Android Studio没有看到该设备。 I created ~10 devices with various configuration and problem still exists. 我用各种配置创建了约10个设备,但问题仍然存在。 My project was created on API 23. When I run AVD Manager from sdk folder it showing up every device that I created... Below I attach the screens of this problem. 我的项目是在API 23上创建的。当我从sdk文件夹运行AVD Manager时,它会显示我创建的每个设备...在下面附加此问题的屏幕。 Can someone help me? 有人能帮我吗?

ps When I changed the target in 'Edit configurations', then my project works, but I would to have a opportunity to test it on various configurations without edit configurations all the time.. ps当我在“编辑配置”中更改目标时,我的项目可以运行,但我将有机会一直在各种配置下对其进行测试,而无需始终进行编辑配置。

Android studio: Android Studio: 在此处输入图片说明

AVD Manager from sdk folder: sdk文件夹中的AVD Manager: 在此处输入图片说明

As there are several sources that explain how to properly setup a AVD - android virtual device, this might be a good idea to check official docs here . 由于有许多资料可以解释如何正确设置AVD-android虚拟设备,因此在此处查看官方文档可能是一个好主意。

  • The basic steps: 基本步骤:

    1. In Visual Studio select Android -> AVD Manager. 在Visual Studio中,选择Android-> AVD Manager。
    2. In AVD Manager press "New". 在AVD Manager中,按“新建”。
    3. Enter a device name and select a target. 输入设备名称并选择目标。 Please use Android 2.3.3 or newer. 请使用Android 2.3.3或更高版本。 Older versions are not stable and might not work. 较旧的版本不稳定,可能无法正常工作。
    4. Press "Create AVD" 按“创建AVD”
    5. Press "Start" 按开始”
    6. Wait till your device starts up. 等待设备启动。

If you do get into "no android devices found" on the AVD manager you would want to retrieve some more info with the following steps: 如果您确实进入了AVD管理器上的“找不到android设备”,则需要通过以下步骤检索更多信息:

  1. Open command-line tool. 打开命令行工具。
  2. Go to platform-tools directory in your Android SDK directory (C:\\Program Files (x86)\\Android\\android-sdk\\platform-tools, ) 转到Android SDK目录中的platform-tools目录(C:\\ Program Files(x86)\\ Android \\ android-sdk \\ platform-tools,)
  3. Run the adb devices command. 运行adb devices命令。
    Credit goes to this article 感谢这篇文章

The output might give a clue regarding the cause. 输出可能会提供有关原因的线索。 In your case i was able to find the following post on SO that deals with similar issue, review it here! 在您的情况下,我能够找到以下关于类似问题的文章,请在此处查看! .

The easiest way is to start the device on which you would like to deploy your app before starting your app. 最简单的方法是在启动应用程序之前启动要在其上部署应用程序的设备。

This way this device will appear in the deployments target should your app be compatible according to its manifest's minSdkVersion field. 如果您的应用根据清单的minSdkVersion字段兼容,则此设备将以这种方式出现在部署目标中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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