我已经在运行Windows XP的机器上设置了Android SDK和Eclipse, avd (Android虚拟设备)保存到“文档和设置\user\。默认为Android。有没有办法改变这种行为?我把所有其他组件都保存在一个单独的分区上的目录中,并希望所有内容都得到整合。显然不是什么大问题,但有人知道解决办法吗?
当前回答
ANDROID_SDK_HOME在Windows 8 x64上也适用 也找到所有的位置(在我的情况下,它是d:\.android)并删除它。你不再需要它了。
其他回答
1 -移动AVD到新文件夹
2 - start菜单>控制面板>系统>高级系统设置(左侧)>环境变量 添加一个新的用户变量: 变量名:ANDROID_AVD_HOME 变量值:您选择的目录的路径
3 -更改文件。ini设置新文件夹。
4 -打开Android Studio
WORKS - Windows 2010
更多说明:https://developer.android.com/studio/command-line/variables
根据官方文档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文件,只需用你的新路径替换它
修改“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\。
用于Windows 10上的Visual Studio 2017
复制C:\Users\ YOURUSERNAME \。android文件夹到(例如)E:\avd
打开环境变量窗口:
进入设置,点击系统。 2 .在界面左侧单击“关于”,在界面右侧选择“系统信息” 底部。 在新窗口中,单击“Advanced system” 左边的设置。 点击环境变量 结果窗口的底部。
添加一个新变量:
变量名:ANDROID_SDK_HOME 变量值:一个目录的路径(例如E:\avd)
不要在变量值中包含.android。
重新启动Visual Studio。
更改SDK和NDK位置到:
工具->选项-> Xamarin -> Android设置
进入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"
推荐文章
- 改变开关的“开”色
- 以编程方式将EditText的输入类型从PASSWORD更改为NORMAL,反之亦然
- 如何在隐藏和查看密码之间切换
- 在Android上调整一个大的位图文件到缩放输出文件
- 如何更改Android版本和代码版本号?
- Android Studio突然无法解析符号
- 应用程序重新启动而不是恢复
- 在Sublime Text 2中使用Ctrl+D进行多个选择时,我如何跳过匹配?
- #定义WIN32_LEAN_AND_MEAN具体排除了什么?
- 如何设置整个应用程序在纵向模式?
- Android中文本的阴影效果?
- 以编程方式设置TextView的布局权重
- Android -如何覆盖“后退”按钮,所以它不完成()我的活动?
- 如何从通知点击发送参数到一个活动?
- 导航目标xxx对于这个NavController是未知的