运行Android虚拟设备时出错
首先,我希望大家都知道我是Android开发的新手,这是我第一次尝试运行Android虚拟设备。
当我从Android Studio运行Android虚拟设备时,我得到以下信息:
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them you will have to do at least one of the following: - Use the '-force-32bit' option when invoking 'emulator'. - Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment. Either one will allow you to use the 32-bit binaries, but please be aware that these will disappear in a future Android SDK release. Consider moving to a 64-bit Linux system before that happens.
我将如何做到这一点(例如使用'-force-32bit'
)?
我使用Ubuntu 15.04 32位,它在我的笔记本电脑上独立运行,而不是在虚拟机上运行。 我启用了虚拟化技术。
要从命令行启动模拟器的实例,请导航到SDK的tools/
文件夹。 像这样输入模拟器命令:
emulator -avd
[ ]
您可以添加您的avd名称代替
和-force-32bit
代替[
阅读此处和此处的文档以了解有关从命令行控制模拟器的更多信息。
要从Android studio执行此操作,您可以编辑或创建运行配置:
- 从“ 运行”菜单中打开“ 编辑配置 ” 。
- 展开Android应用程序项并创建新配置或打开现有配置。
-
选择“运行配置”后,调整所需的运行配置设置:
在“ 模拟器”选项卡中,为“ 附加模拟器命令行选项”字段指定任何模拟器选项。 所以把
-force-32bit
放在这里。
在官方文档中阅读更多相关信息。