簡體   English   中英

如何修復 Android Studio 模擬器無法啟動?

[英]How to fix Android Studio emulator failing to launch?

TLDR - Android Studio 不會加載模擬器,並說雲操作不成功以及以下錯誤消息:

> Task :app:processDebugResources FAILED
Execution failed for task ':app:processDebugResources'.
> Failed to create MD5 hash for file content.

安卓工作室版本:

**Android Studio Arctic Fox | 2020.3.1 Patch 4
Build #AI-203.7717.56.2031.7935034, built on November 20, 2021
Runtime version: 11.0.10+0-b96-7249189 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin**

首先,我單擊運行以啟動 Pixel 5 API 26 模擬器並運行我的應用程序,我的計算機藍屏並顯示錯誤 KMOD_EXCEPTION_NOT_HANDLED,並且失敗的文件是 IntelHaxm.sys。

重新啟動后,我再次嘗試,Android Studio 給出了一個我沒有復制下來的不同錯誤——一些關於文件損壞的錯誤。 當我開始谷歌搜索時,我發現的唯一一件事就是刪除 .gradle 文件並讓它重新構建。 當我再次嘗試時,我得到了開頭提到的錯誤。 使緩存無效並重新啟動后的結果相同。

幾天前和現在工作的唯一區別是計算機重新啟動,我安裝了已經卸載的 CPU-Z,我安裝了 HWMonitor 來查看 CPU 溫度。

這是構建日志的其余部分:

Executing tasks: [:app:assembleDebug] in project C:\Users\matth\OneDrive\School\Capstone\Module 8\NewProject

AGPBI: {"kind":"warning","text":"We recommend using a newer Android Gradle plugin to use compileSdk = 32\n\nThis Android Gradle plugin (7.0.4) was tested up to compileSdk = 31\n\nThis warning can be suppressed by adding\n    android.suppressUnsupportedCompileSdk=32\nto this project's gradle.properties\n\nThe build will continue, but you are strongly encouraged to update your project to\nuse a newer Android Gradle Plugin that has been tested with compileSdk = 32","sources":[{}]}
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:checkDebugAarMetadata
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :app:processDebugMainManifest
> Task :app:mergeDebugResources
> Task :app:processDebugManifest
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:mergeDebugShaders
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:javaPreCompileDebug
> Task :app:mergeDebugAssets
> Task :app:compressDebugAssets
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:desugarDebugFileDependencies
> Task :app:mergeDebugJniLibFolders
> Task :app:checkDebugDuplicateClasses
> Task :app:processDebugManifestForPackage
> Task :app:processDebugResources FAILED
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:mergeLibDexDebug
> Task :app:validateSigningDebug
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:mergeExtDexDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to create MD5 hash for file content.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 9s
22 actionable tasks: 22 executed

編輯:它可以在我的筆記本電腦上使用相同的文件(它們通過 OneDrive 同步)

問題是在 BIOS 中禁用了 VT-x。 我忘記更新我的 BIOS,並且必須重置設置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM