Android Emulator:默认选择AVD(Android Virtual Device)运行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1536384/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:13:42  来源:igfitidea点击:

Android Emulator: select AVD (Android Virtual Device) to run by default

androideclipseavd

提问by znq

I have added a second Virtual Device to test a different screen resolution (QVGA), but now I wanna switch back to the first AVD (HVGA) again. How can I set the virtual device in Eclipse to be used by default or even specifically for my project? In the properties I can only set the API level.

我添加了第二个虚拟设备来测试不同的屏幕分辨率 (QVGA),但现在我想再次切换回第一个 AVD (HVGA)。如何将 Eclipse 中的虚拟设备设置为默认使用,甚至专门用于我的项目?在属性中,我只能设置 API 级别。

I also couldn't find any information in the command line tool documentationto set this manually.

我也无法在命令行工具文档中找到任何信息来手动设置它。

回答by Intrications

In Eclipse, click on Run in the toolbar then Run Configurations. Select your application and click on the Target tag. You can then select which AVD to use or set it to manual so it asks you each time you run the app.

在 Eclipse 中,单击工具栏中的运行,然后单击运行配置。选择您的应用程序并单击 Target 标签。然后,您可以选择要使用的 AVD 或将其设置为手动,以便每次运行应用程序时它都会询问您。

Note that if the AVD's Android version is lower than the Minimum API level set in the Manifest, the AVD will not appear in the list.

请注意,如果 AVD 的 Android 版本低于 Manifest 中设置的最低 API 级别,则 AVD 将不会出现在列表中。

回答by love2script12

In AndroidManifest.xml, see that your minSdkVersion and targetSdkVersion match your device.

在 AndroidManifest.xml 中,查看您的 minSdkVersion 和 targetSdkVersion 是否与您的设备匹配。

回答by user1283182

In new Eclipse Kepler version, right click your project, then click Run as->Run Configurations->"Target" tab, you will see all AVDs in the list, select one as a preferred one, then "Apply" and "Run"

在新的 Eclipse Kepler 版本中,右键单击您的项目,然后单击 Run as->Run Configurations->“Target”选项卡,您将看到列表中的所有 AVD,选择一个作为首选,然后“应用”和“运行”