Programming/Non programming

Monday, March 22, 2010

Android:How to avoid XML verification failed error and Upgrading to 2.x SDK successfully?

Android:

How to avoid XML verification failed error and Upgrading to 2.x SDK successfully?

Reason:
When we want to upgrade Android SDK to any latest available versions, we will choose go to Eclipse menu->Window->Android SDK and AVD Manager, sometimes it throws error as follows:

Error:
XML verification failed for https://dl-ssl.google.com/android/repository/repository.xml. Error: cvc-elt.1: Cannot find the declaration of element 'sdk:sdk- repository'. Failed to fetch URL

To resolve such thing, there are two ways described below, either one would resolve it!

One quick solution:

Instead of "https", try to add same repository URL as "http"

If you are still facing the same problems,

Then you are running into older version of Android tools 3.0 or below, which will not be able to do upgradation from Repository URL in this way. you need to follow the below steps:

Second solution

Close Eclipse.

1. You will need to download a newer starter package from http://developer.android.com/sdk/index.html

There will be a Zip file to download. For example, for mac download, choose "Mac OS X (intel)-android-sdk_r05-mac_86.zip"

2. After downloading it, just extract it.

3. Replace "Tools" folder from the new one to existing installed one.
Example: copy "Tools" folder from the new download folder and then overwrite with the "Tools" folder installed the Android SDK already available in your computer.

4. Launch Eclipse. You may find error as "The Android SDK requires Android Developer Toolkit version 0.9.6 or above. Current version if 0.9.3.v200090 . Please update to latest version of ADT. "

do not worrry, do the below...

5. Go to eclipse menu "Help->Install New Software". Click on "Add". Provide a name and add URL as
https://dl-ssl.google.com/android/eclipse/
Click "OK". you can find the site selected with checkbox.
Check the name you have provided for that link, it will display the ADT tools. Choose and click "Finish".

6. Go again to,

Eclipse menu->Window->Android SDK and AVD Manager

It should be able to download the latest version of SDK's and other docs etc. Choose whatever you want and download it.
After downloading all selected, it will ask you restart the computer automatically. Do the same.

That's it, you got to go and eat your peanuts well ( no tension ;-) ) !


Thank you for followers!

Cheers,

M.P.Prabakar
Senior Systems Analyst.

Have fun and be addictive by playing "TossRing" marvelous iPhone game. Link is below..

Android:Create new Android Virtual Device(AVD) to deploy applications on Emulator:

Android:

How to create new Android Virtual Device(AVD) to deploy applications on Emulator:

1. Launch Eclipse
2. Click Window->Android SDK and AVD Manager

(OR)

If you are facing launching "Android SDK and AVD Manager", then
1. go to your installed Android SDK folder, and "Tools" folder there.
2. Click "android" file there

It will automatically launch Android SDK and AVD Manager.
Provide new name for your virtual device and choose the Target to be deployable(version) and click on 'Create AVD' to create it.

============================================================================================

After done with either of the above thing, do the following..

1. Launch Eclipse
2. Menu Run->Run Configurations
3. Choose the project and then "Target" tab
4. In the Target tab, you will find list of Virtual devices which you have added by following above point. Choose there which version you want to deploy.


That's it ;-) !!!

Cheers!
M.P.Prabakar
Senior Systems Analyst.

Have fun and be addictive by playing "TossRing" marvelous iPhone game. Link is below..
http://itunes.apple.com/us/app/tossring/id358100360?mt=8