我已经在运行Windows XP的机器上设置了Android SDK和Eclipse, avd (Android虚拟设备)保存到“文档和设置\user\。默认为Android。有没有办法改变这种行为?我把所有其他组件都保存在一个单独的分区上的目录中,并希望所有内容都得到整合。显然不是什么大问题,但有人知道解决办法吗?
当前回答
In Windows 10 I had that problem because My C Drive was getting full and I had needed free Space, AVD folder had 14 gig space so I needed to move that folder to another driver, first answer not work for Me so I tested another way to fix it this problem, I make a picture for you if you have the same problem, you don't need to move all of the files in .android folder to another drive (this way not work) just move avd folders in ....android\avd to another drive and open .ini files and change avd folder path from that file to the new path. Like this image:
我希望这对你有用。
注意:小心在ini文件的路径之前和之后有一个你看不到的单独的字符,如果你删除了那个字符,它就不起作用了
其他回答
主要有4个步骤 1. 复制。Android文件夹到你想要的位置,就像我在D:\Android\.android中做的那样 2. 在环境变量ANDROID_AVD_HOME D:\Android\.android\avd中设置ANDROID_AVD_HOME 3.更改avd name.ini文件内容的新位置,如 avd.ini.encoding = utf - 8 路径= D: \安卓\ .android \ avd \ Pixel_2_API_29.avd path.rel = avd \ Pixel_2_API_29.avd 目标= android-29 4. 重启android studio
我关注了https://www.mysysadmintips.com/windows/clients/761-move-android-studio-avd-folder-to-a-new-location。
Start copying a folder "C:\Users\user\.android\avd" to "D:\Android\.android\avd" (or something else). Close Android Studio and running emulators. Press Win + Break and open Advanced System Settings. Then press Environment Variables. Add a user variable ANDROID_SDK_HOME. (I didn't experiment with ANDROID_AVD_HOME.) In Variable value field write D:\Android. If you also moved SDK to another folder, change ANDROID_HOME (I forgot to change it and some emulators didn't launch, see https://stackoverflow.com/a/57408085/2914140). Wait until the folder will finish copying and start Android Studio. Open Android Virtual Device Manager and see a list of emulators. If you don't see emulators and they existed, then probably you entered wrong path into user variable value in step 3. In this case close AS, change the variable and open AS again. Start any emulator. It will try to restore it's state, but it sometimes fails. A black screen can appear instead of Android wallpaper. In this case you can: a. Restart your emulator. To do this close running emulator, then in AVD Manager click Cold Boot Now.
b.如果这没有帮助,打开模拟器设置,在文件“D:\Android\. Android\ avd\Pixel_API_27.ini”中找到。
更改路径到一个新的AVD文件夹。重新启动模拟器。
删除旧的AVD文件夹从“C:\Users\user\.android\ AVD”
进入Android tools目录。编辑android.bat命令文件。在命令文件的末尾,找到类似于
call %java_exe% -Djava.ext.dirs=%java_ext_dirs% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir="%work_dir%" -jar %jar_path% %*
和替换
call %java_exe%
with
call %java_exe% -Duser.home={your_prefer_dir}
{your_prefer_dire}是您的首选目录,不带大括号,但添加双引号,
如。
call %java_exe% -Duser.home="E:\Program Files (x86)\android-sdk-windows"
另一种指定ANDROID_SDK_HOME而不涉及环境变量的方法(特别是在使用ec2时)是简单地创建一个eclipse快捷方式并添加以下内容作为目标
C:\ windows \ system32 \cmd.exe /C "setx ANDROID_SDK_HOME你的AVD路径/M &你的ECLIPSE.EXE路径"
这将在启动eclipse时将ANDROID_SDK_HOME设置为系统变量。
HTH 保罗
修改“C:\Documents and Settings{your windows login}.android\avd\”中的“virtual_android2.2.ini”文件:
target=android-8
path=E:\android_workspace\avd\virtual_android2.2.avd
移动文件夹virtual_android2.2。从“C:\文档和设置{您的windows登录}。android\avd\变成E:\android_workspace\avd\。
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 碎片中的onCreateOptionsMenu
- TextView粗体通过XML文件?
- 如何使线性布局的孩子之间的空间?
- 我如何找到哪个程序正在使用端口80在Windows?
- 在Windows中有像GREP这样的模式匹配实用程序吗?
- DSL元素android.dataBinding。enabled'已过时,已被'android.buildFeatures.dataBinding'取代
- ConstraintLayout:以编程方式更改约束
- PANIC: AVD系统路径损坏。检查ANDROID_SDK_ROOT值
- 如何生成字符串类型的buildConfigField
- Recyclerview不调用onCreateViewHolder
- 如何在Windows命令提示符下运行.sh ?
- Android API 21工具栏填充
- Android L中不支持操作栏导航模式