为什么我的项目会在手机上运行,​​而不在我的AVD上运行?

时间:2019-01-14 15:15:52

标签: android android-studio

我已经创建了一个项目,该项目可以正常运行,并且满足我的需要。问题是,我需要它在我的手机以及AVD上运行。当我打开AVD(即Nexus 5X API 28)时,AVD不会打开任何问题,但是项目将无法运行。这是我的event log中介绍的内容。我无法确定这是什么意思,因为我是新的android创作者,但是如果有人可以告诉我这是什么意思,这将有所帮助?谢谢。

14:59   Project setup started
14:59   Gradle sync finished in 6 s 791 ms (from cached state)
14:59   * daemon not running; starting now at tcp:5037
14:59   * daemon started successfully
15:00   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.
15:00   Emulator: dsound: Could not initialize DirectSoundCapture
15:00   Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
15:00   Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
15:00   Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
15:00   Emulator: audio: Failed to create voice `goldfish_audio_in'
15:00   Emulator: C:\Users\PC_User\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed
15:00   Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
15:00   Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
15:00   Emulator: audio: Failed to create voice `adc'
15:02   Executing tasks: [:app:assembleDebug]
15:03   Gradle build finished in 1 m 35 s 896 ms

1 个答案:

答案 0 :(得分:0)

以下一些技巧可能会对您有所帮助:

  • 冷启动仿真设备,然后重新安装apk。 AVD管理器->操作->向下箭头:立即冷启动->删除应用程序->尝试安装并再次运行它(也许看一下logcat)
    • 清理并重建项目:生成->清理项目->生成->重建项目
    • 删除缓存并重新启动IDE:File-> Invalidate Caches / Restart