如何更新为最新的Andr​​oid SDK工具的更新旧的Andr​​oid项目?新旧、工具、项目、最新

2023-09-06 15:14:29 作者:搁浅的旧時光

previously我使用的的Andr​​oid SDK工具的旧版 ,到现在我搬到了一台新电脑,安装从头开始我的新的发展环境和复制并从previous PC导入的项目。现在,如果我创建在当前环境下新的项目,我注意到SDK创建的项目,我没有看到任何我的previous项目上的previous的根文件夹中的文件proguard.cfg建立。我抬起头,用proguard.cfg的,这听起来非常有用。但是,这proguard.cfg文件不是present中,我在previous安装程序创建的项目。

Previously I was using an older version of Android SDK Tools, and now I moved to a new pc, setup my new development environment from scratch and copied and imported the projects from the previous pc. Now if I create a new project in the current environment I notice that the SDK creates a file proguard.cfg in the root folder of the project which I didn't see for any of my previous projects on the previous setup. I looked up the use of proguard.cfg and it sounds useful. But this proguard.cfg file is not present in the projects which I created on the previous setup.

和,这也让我觉得,新的SDK工具,也可能有一些新的更新和/或新增功能,我可以利用。我要指出,这我使用的目标平台是相同的 - Android 2.2系统,但Android的SDK工具进行了更新。另外,我没有得到任何以现在的任何错误,但正如我所说,我想利用更新的SDK工具(而不是目标平台更新)。

And, it also makes me think that the new SDK tools might also have some new updates and/or feature additions which I could make use of. I should mention that the target platform which I'm using is the same - Android 2.2, but the "Android SDK Tools" have been updated. Also, I'm NOT getting any error of any kind as of now, but as I said, I want to make use of updates to the SDK tools (and not to the target platform updates).

所以,我的问题是 - 有没有一种方法,以确保我不会错过任何东西搭载Android SDK更新,如proguard.cfg或者我需要自己找出这样的事情,并手动添加文件,同样的这得到了新的SDK工具提高了任何其他的东西。

So, my question is - Is there a way to ensure that I'm not missing anything updated by Android SDK like the proguard.cfg or I'll need to myself identify such things and manually add the file, and similarly for any other things which got improved in the newer SDK tools.

推荐答案

在Android SDK的工具目录下,有可执行机器人。您可以使用此传递的路径,包含AndroidManifest.xml中的目录更新项目:

In the tools directory of the Android SDK, there's the executable android. You can use this to update a project by passing the path to the directory containing the AndroidManifest.xml:

$ANDROID_SDK/tools/android update project -p /path/to/my-android-project

这是记录在SDK站点下的从命令行管理项目的>的更新项目的。

在Eclipse插件不会自动做到这一点,有一个在的从Eclipse的管理项目与ADT 页,所以看起来你必须使用命令行工具。

The Eclipse plugin doesn't do this automatically, and there's no equivalent section in the Managing Projects from Eclipse with ADT page, so it looks like you have to use the command line tool.