Unknown error while creating AVD in Android Studio
Asked Answered
A

5

7

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 Manager screenshot

Shows when click troubleshoot

Shows when click finish

Acquittance answered 14/1, 2018 at 11:16 Comment(2)
and what does idea.log say?Inspissate
idea.log says : WARN - vdmanager.AvdManagerConnection - Exception during AvdManager initialization: java.lang.NullPointerExceptionFogel
A
1

The problem resolved by reinstalling android studio

Acquittance answered 19/1, 2018 at 14:35 Comment(2)
I reinstall, but still facing the same issue.Dispensary
Maybe clearing the avd image might do , also try other solutionsAcquittance
D
5

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:

enter image description here

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/

enter image description here

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.

Dispensary answered 12/12, 2019 at 10:58 Comment(0)
P
2

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).

Perdition answered 22/2, 2018 at 18:43 Comment(1)
Widnows location C:\Users\UserName\.android\avdDispensary
A
1

The problem resolved by reinstalling android studio

Acquittance answered 19/1, 2018 at 14:35 Comment(2)
I reinstall, but still facing the same issue.Dispensary
Maybe clearing the avd image might do , also try other solutionsAcquittance
W
0

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

Then, go to this link, https://learn.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...

Work answered 2/1, 2022 at 2:35 Comment(0)
S
0

One possible reason is that adb.exe is blocked by your organisation's Group Policy.

You can check this by looking in the idea.log file. Go to Help -> Show Log in Explorer.

2023-04-03 15:37:43,629 [  60269]   WARN - #c.a.ddmlib - Cannot run program "C:\Users\x\AppData\Local\Android\Sdk\platform-tools\adb.exe": CreateProcess error=1260, This program is blocked by group policy. For more information, contact your system administrator
Sokil answered 3/4, 2023 at 3:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.