简体   繁体   中英

Unknown error while creating AVD in Android Studio

AVD Manager in my android studio was working fine, until an unexpected shutdown caused AVD Manager to act weird. Now I can't run any AVD's.

When I click any system-image it says unknown error under recommendation. When I click finish it says:

An error occurred while creating the AVD. See Idea.log for more details.

Here are the screenshots:

AVD 管理器截图

单击故障排除时显示

单击完成时显示

I was able to solve this using this solution .

[Delete] *.ini files from a directory home//.android/avd It's for Ubuntu. In Windows it's also in the user's folder (.android/avd).

I deep dive into this issue and found the following solution. There was a problem to run mksdcard sdk tool. Some SDK tools such as mksdcard.exe require Microsoft Visual C++ runtime. So go to your System properties and check your System type:

在此处输入图片说明

Then based on your system type,(for me it was x64) download/update the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 from the link https://visualstudio.microsoft.com/downloads/

在此处输入图片说明

After installing Microsoft Visual C++, the problem was fixed. Also the Unknown error problem was fixed and I was able to create the avd successfully.

通过重新安装android studio解决的问题

First, go to control panel, Remove, if exists Microsoft Visual C++ 2015 Redistributable package x86 or x64,

Then, go to this link, https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

download Visual Studio 2015,2017,2019,2022 latest package x86 and x64 version. Install two version then, restart pc, Error is gone...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM