可以为AVD .ini文件找到Android SDK安装目录

发布于 2025-01-19 08:07:52 字数 1201 浏览 2 评论 0 原文

I am getting this error when trying to create a new AVD:

enter image description here

This is the idea log file:

2022-04-05 14:01:12,132 [207201] WARN -VDMANAGER.VDMANAGER.AVDMANAGERECORCONNECTION -COM.ANDROID.PREFS.ANDROIDLLATOCESEXCEPTION:无法定位Android SDK安装目录

我的环境变量如下:

android_avd_home = e:\ androidstudiosdk

android_sdk_home = e:\ androidstudiosdk

android_sdk_root = e:\ androidstudiosdk

I don´t know which .ini file is looking for.

These are the SDK platforms installed:

enter image description here

This is what I have in SDK Tools:

I tried uninstalling and installing Android studio again with no different results.

如何解决此错误?

顺便说一句:我没有运行任何项目,我只想创建虚拟设备。

I am getting this error when trying to create a new AVD:

enter image description here

This is the idea log file:

2022-04-05 14:01:12,132 [ 207201] WARN - vdmanager.AvdManagerConnection - com.android.prefs.AndroidLocationsException: Can't locate Android SDK installation directory for the AVD .ini file.

My Environment Variables are the following:

ANDROID_AVD_HOME=E:\AndroidStudioSDK

ANDROID_SDK_HOME=E:\AndroidStudioSDK

ANDROID_SDK_ROOT=E:\AndroidStudioSDK

I don´t know which .ini file is looking for.

These are the SDK platforms installed:

enter image description here

This is what I have in SDK Tools:
enter image description here

I tried uninstalling and installing Android studio again with no different results.

How to fix this error?

by the way: I am not running any project, I simply want to create the Virtual Device.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

瑾兮 2025-01-26 08:07:52

我收到相同的警报,因为设置错误环境变量,将 ANDROID_SDK_HOME 设置为 .android 目录可能有用,这些是我的环境变量:

ANDROID_AVD_HOME=D:\Android\.android\avd

ANDROID_SDK_HOME=D:\Android\.android

ANDROID_SDK_ROOT=D:\Android\Sdk

I get same alert because set error environment variables, setting ANDROID_SDK_HOME to the .android directory may be useful, these are my environment variables:

ANDROID_AVD_HOME=D:\Android\.android\avd

ANDROID_SDK_HOME=D:\Android\.android

ANDROID_SDK_ROOT=D:\Android\Sdk

御守 2025-01-26 08:07:52

这里有一些“如果”和“但是”。如果您卸载了旧版本的 android studio 并且接受的解决方案不起作用,则这适用;尝试删除 $HOME\AppData\Local\Google\AndroidStudio20XX.X

除了最新的之外的所有内容都可以删除。

There are some of if's and but's here. This applies if you have uninstalled an old version of android studio and the accepted solution doesn't work; try deleting $HOME\AppData\Local\Google\AndroidStudio20XX.X

All but the latest could be deleted.

等待我真够勒 2025-01-26 08:07:52

我通过删除与 Android Studio SDK 工具的 plat-form-tools 相关的路径解决了这个问题,问题就解决了。

因此,如果您遇到此问题,您还可以尝试从环境变量中删除所有添加的与SDK文件夹相关的路径。

I resolved this issue just by deleting the path related to plat-form-tools of my Android Studio SDK tools and the issue was resolved.

So if you have faced this issue, you can also try to remove all paths added related to the SDK folder from Environment Variables.

许一世地老天荒 2025-01-26 08:07:52

z.houbin 答案有效,谢谢,我添加了这些环境变量:

ANDROID_AVD_HOME=C:\Users\Roman\.android\avd
ANDROID_SDK_HOME=C:\Users\Roman\.android
ANDROID_SDK_ROOT=C:\Users\Roman\AppData\Local\Android\Sdk

z.houbin answer works, thanks, I have added these environment variables:

ANDROID_AVD_HOME=C:\Users\Roman\.android\avd
ANDROID_SDK_HOME=C:\Users\Roman\.android
ANDROID_SDK_ROOT=C:\Users\Roman\AppData\Local\Android\Sdk
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文