我已经在运行Windows XP的机器上设置了Android SDK和Eclipse, avd (Android虚拟设备)保存到“文档和设置\user\。默认为Android。有没有办法改变这种行为?我把所有其他组件都保存在一个单独的分区上的目录中,并希望所有内容都得到整合。显然不是什么大问题,但有人知道解决办法吗?
当前回答
我认为最简单的方法是从C:\Users[USER]移动avd文件夹。然后在C:\Users[USER]中创建一个指向它的符号链接。Android同名。
如果你想知道如何做到这一点,首先安装链接外壳扩展。在文件夹移动后,右键单击它,选择选择链接源,然后右键单击。android文件夹,然后在Drop As…子菜单选择符号链接。
其他回答
看看这个。 使用android命令创建avd,您可以指定文件放置的位置。
-p --path Location path of the directory where the new AVD will be created
根据官方文档https://developer.android.com/studio/command-line/variables.html,您应该更改ANDROID_AVD_HOME environment var:
Emulator Environment Variables By default, the emulator stores configuration files under $HOME/.android/ and AVD data under $HOME/.android/avd/. You can override the defaults by setting the following environment variables. The emulator -avd command searches the avd directory in the order of the values in $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/.android/avd/, and $HOME/.android/avd/. For emulator environment variable help, type emulator -help-environment at the command line. For information about emulator command-line options, see Control the Emulator from the Command Line. ANDROID_EMULATOR_HOME: Sets the path to the user-specific emulator configuration directory. The default location is $ANDROID_SDK_HOME/.android/. ANDROID_AVD_HOME: Sets the path to the directory that contains all AVD-specific files, which mostly consist of very large disk images. The default location is $ANDROID_EMULATOR_HOME/avd/. You might want to specify a new location if the default location is low on disk space.
在修改或设置ANDROID_AVD_HOME后,你必须将所有内容移动到~user/。Android /avd/到你的新位置,并改变路径到每个模拟器的ini文件,只需用你的新路径替换它
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文件的路径之前和之后有一个你看不到的单独的字符,如果你删除了那个字符,它就不起作用了
1 -移动AVD到新文件夹
2 - start菜单>控制面板>系统>高级系统设置(左侧)>环境变量 添加一个新的用户变量: 变量名:ANDROID_AVD_HOME 变量值:您选择的目录的路径
3 -更改文件。ini设置新文件夹。
4 -打开Android Studio
WORKS - Windows 2010
更多说明:https://developer.android.com/studio/command-line/variables
移动你的。android到任何你想要的地方。
然后,创建一个像这样的符号链接:
# In your home folder
$ ln -s /path/to/.android/ .
这只是告诉Linux无论何时路径~/。Android被任何应用程序引用,链接到/path/to/. Android。
推荐文章
- Android Studio, logcat在应用程序关闭后清理
- 在android中从上下文获取活动
- 无法解析主机"<URL here>"没有与主机名关联的地址
- getActivity()在Fragment函数中返回null
- 按钮背景是透明的
- 在Mac OS X上哪里安装Android SDK ?
- 我如何获得图像缩放功能?
- GIT克隆在windows中跨本地文件系统回购
- 在Android应用程序中显示当前时间和日期
- BottomSheetDialogFragment的圆角
- 在应用程序启动时出现“无法获得BatchedBridge,请确保您的bundle被正确打包”的错误
- 我如何改变默认对话框按钮的文本颜色在安卓5
- 更改单选按钮的圆圈颜色
- 如何在android中复制一个文件?
- adb找不到我的设备/手机(MacOS X)