在Android Eclipse中更改环境变量名称

时间:2014-03-10 09:48:41

标签: android eclipse environment-variables

我们有一台基于Windows操作系统(Windows 7)的主计算机,团队成员可以以共享方式访问。我们在机器上有很长时间的Android SDK Bundle。此捆绑包使用设置为“系统属性”中特定路径的环境变量ANDROID_SDK_HOME

出于特定原因,今天我下载了最新的SDK包。我需要将ANDROID_SDK_HOME设置为不同的路径。显然,我不能在不打扰其他团队成员的情况下这样做。那么,有没有办法在Eclipse配置中将变量名ANDROID_SDK_HOME更改为NEW_ANDROID_SDK_HOME,并将系统属性中的NEW_ANDROID_SDK_HOME设置为新ADK捆绑包的所需值?

更新

在此source code中,访问变量ANDROID_SDK_HOME以获取其路径值。这只是一个源代码,而SDK包显然是一堆编译和/或二进制的东西。所以,它可能提供一个线索。

此外,对于那些将SDK Home和SDK Location视为同一个东西的人来说,这里有清除空气的链接:

1)Link 1

2)Link 2

3)当然,the answer below由@sanjeev提供。

1 个答案:

答案 0 :(得分:0)

试试这个兄弟。打开你的local.properties并设置你的android SDK路径

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.

# location of the SDK. This is only used by Ant
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Applications/android-sdk

enter image description here

如果找不到local.properties,请cd到项目文件夹并运行此命令

ant update project -p
相关问题