Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update old Android project for the updates in new Android SDK tools?

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.

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).

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.

like image 851
Atul Goyal Avatar asked Dec 19 '11 09:12

Atul Goyal


1 Answers

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

This is documented on the SDK site under Managing Projects from the Command Line > Updating a Project.

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.

like image 106
richq Avatar answered Oct 19 '22 07:10

richq