Basic steps for upgrading source code from SDK 1 5 to 2 1 using Eclipse IDE

| |
This is a step by step guide to upgrade one’s source code that was developed for an earlier version of android SDK, as is to work on a new version of SDK installed on your development environment



Pre-requisites:
1. You are using Eclipse IDE - Ganymede
2. You have installed SDK 2.1 on your machine
3. You have upgraded ADT to 0.96 on Eclipse IDE
4. You have pointed the Eclipse IDE to the new SDK 2.1
5. You have changed the default JDK compiler version on Eclipse to 1.6
6. You have created an Android Virtual Device (AVD) that uses the SDK 2.1 / Google API


NOTE: Upgrading SDK and Eclipse installations itself is provided in detail at http://developer.android.com/sdk/index.html & http://developer.android.com/sdk/installing.html


For each project that you have in your eclipse workspace that was written for the earlier version of SDK, you need to do the following for basic upgrade (this does not include the upgrade of APIs that have be deprecated):

Step-by-step guide
1. Right click the project and go to Project Properties -> Android
2. You wil see tha right pane showing the ‘Project Build Target’
3. In this pane you will see either or both: ‘Android 2.1’ & ‘Google APIs’ depending on what you chose to install when upgrading your ADT to 0.96
4. Select Google ‘Android 2.1’ or ‘Google API” whichever is required by your earlier project (note you might have used only Android 1.5 for most projects. You would need Google API only for those projects that use google maps)
5. Then, go to the ‘Project’ menu and click on ‘clean’. Note, this is an optional step. You may have to do this if you get the error ‘Conversion to Dalvik format failed with error 1’.
6. Then, build the project by going to ‘Project’ -> ‘build’
7. You are done. You can now run the earlier Android application using the new SDK 2.1


Related Posts by Categories

0 comments:

Post a Comment