无法在模拟器中运行应用程序(Windows 7 上的 Android Studio 3.4.2) [英] Cannot run app in emulator (Android Studio 3.4.2 on Windows 7)

查看:59
本文介绍了无法在模拟器中运行应用程序(Windows 7 上的 Android Studio 3.4.2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 7 上的 Android Studio 3.4.2,64 位,Intel Core 2 Duo

我创建了一个带有 API 26、屏幕 800 x 1280 和冷启动的虚拟设备,以便运行这个

我很惊讶,因为我选择了冷启动.

我点击了确定但等待了很长时间然后看到

<块引用>

"等待设备时出错:等待 300 秒后超时让模拟器上线."

模拟器屏幕是黑色的.在事件日志中:

<块引用>

8/9/2019 10:02 AM 执行任务:[:app:assembleDebug]

上午 10:02 模拟器:警告:不支持快速启动/快照这台机器.当前需要具有 EPT + UG 功能的 CPU.我们将在未来的版本中解决这个问题.

上午 10:02 Gradle 构建在 4 秒 285 毫秒内完成

我尝试了这个 SO answer 来使用系统映像 armeabi-v7a,但它不起作用.我还尝试安装系统映像 x86_64 和 x86,但模拟器甚至无法启动.

解决方案

我尝试了很多建议的方法.但可能是由于旧处理器对我不起作用.

Soln 我更喜欢 - 您没有必要只使用 Android Studio 的 AVM.您可以将自己的 Android 智能手机设置为虚拟设备.

另一种方法是:您可以通过 USB 连接您的安卓智能手机

  • 在手机设置中开启开发者模式(- 更多设置开发者模式)
  • 确保 USB 调试已打开.
  • 在几秒钟内打印 Hello World(在 Android Studio/IntelliJ Idea/其他 IDE 中),应用将直接在您的手机上打开.

希望它有效!

这唯一的方法适用于我的 Pentium(R) 双核台式机.

注意:为了安全起见,当您打开开发人员模式时,请关闭电话互联网.还要确保您的手机操作系统与选择用于开发的操作系统相匹配或先进.

提示:如果您在 PC 上有 8Gb 内存,这将以正常速度运行而不会花费太多时间.

Android Studio 3.4.2 on Windows 7, 64 bit, Intel Core 2 Duo

I created a virtual device with API 26, screen 800 x 1280 and cold boot, in order to run this tablet-mode android tutorial. It runs fine on my actual phone (hardware phone). When I click 'Run' and select the tablet emulator, it does not run . on the AS toolbar, I see

I am surprised because I had selected Cold Boot.

I click OK but wait for a long time and then see

"Error while waiting for device: Timed out after 300 seconds waiting for emulator to come online."

the emulator screen is black. In the event Log:

8/9/2019 10:02 AM Executing tasks: [:app:assembleDebug]

10:02 AM Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.

10:02 AM Gradle build finished in 4 s 285 ms

I tried this SO answer to use system image armeabi-v7a instead, but it did not work. I also tried installing system image x86_64 and x86 but the emulator would not even launch.

解决方案

I tried many suggestions methods. But might be due to old processor it didn't work for me.

Soln I preferred - it's not necessary that you should use only AVM by Android Studio. You can set your own Android smart phone as virtual device.

An alternative method is: you can connect your android smartphone via USB

  • Turn ON Developer Mode in your Phone settings (- More Settings Developer Mode)
  • See to it that USB-Debugging is turned ON.
  • Print Hello World (in Android Studio / IntelliJ Idea / Other IDE) within few seconds an app will be directly open on your phone.

Hope it works !

This only method worked on my Pentium(R) Dual Core Desktop.

Note : Turn off Phone Internet when you turn on Developer Mode for safer side. Also see to it that your phone OS is matching or advanced with respect to OS selected for development.

Tip : This will work at normal speed without taking much time if you have 8Gb Ram on PC.

这篇关于无法在模拟器中运行应用程序(Windows 7 上的 Android Studio 3.4.2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆