tags:

views:

4622

answers:

6

I'm trying to install Android SDK on Ubuntu but fail when I try to use the SDK Manager and AVD Manager to install Android platforms.

I've downloaded: android-sdk_r04-linux_86.tgz

The I start the SDK Manager and AVD Manager (UI) according to the README file:

./tools/android

And I get the following

  Installed Packages:
  - Install SDK Tools, revision 4

  Available Packages:
  - https://dl-ssl.google.com/android/repoisotry/repository.xml
    - This repository requires a more recent version of the Tools. Please update-
    - Android SDK Tools, revision 4 
      - Archive for Linux

(comment: funny since rev 4 seems to be what's installed this is what seems to be installed)

Now doing an update of the Android SDK Tools, revision 4 or everything results in 99% progress and then the application hangs.

Here's the console feedback:

johanc@johan-desktop:~/android/android-sdk-linux_86$ tools/android 
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Error: null

In the app I choose to upgate the following package:

Package Description
Android SDK Tools, revision 4

Archive Description
Archive for Linux
Size: 15 MiB
SHA1: 99380c9330c1c3728c836206947350cc00fa28c2

Site
https://dl-ssl.google.com/android/repository/repository.xml

The console output reads (and the app hangs at 99%):

Exception in thread "Installing Archives" java.lang.AssertionError
   at com.android.sdkuilib.internal.tasks.ProgressTask.incProgress(ProgressTask.java:97)
   at com.android.sdkuilib.internal.repository.UpdaterData$2.run(UpdaterData.java:358)
   at com.android.sdkuilib.internal.tasks.ProgressTask$1.run(ProgressTask.java:135)
+2  A: 

What version if Java are you running?

Some earlier versions ofJava 1.5 were lacking a proper XML validator, and made the XML validation fail in the SDK Manager (we didn't properly checked that a validator were present).

Unfortunately once the validation fails, it reverts to the wrong code path and behaves as if you have an older version of the tools.

We are fixing this for the next version of the SDK Manager, but in the mean time you can try to update your version of Java.

Xav
+1  A: 

1) Open SDK and AVD manager - for that Give command tools/android

2) Go in to the settings

3) Make TRUE the option "Force to be fetched using http"

4) Then go to install package and update the package

hiren
How do you go into settings?
McBainUK
A: 

Downgrading to previous version of the SDK got this working for me. I experienced the same problems on mac 10.5 with the latest Android sdk (r04-mac) and could not find any other way to resolve the issue.

Previous versions are available in the SDK Archives.

Arrel
+1  A: 

I went to Eclipse's "help > check for updates" menu and blindly accepted all the updates :). Did a restart of the app and everything was cool.

Nathanieljla
A: 

I was having this problem as well. I looked at which version of java my Karmic Ubuntu was running and the link it pointed to was gij-4.4 (GNU interpreter for Java) (I had to do a little tracing of links)

which java

I switched /usr/bin/java to point to /usr/lib/jvm/java-6-sun/bin/java and all is now well.

rm /usr/bin/java ln -s /usr/lib/jvm/java-6-sun/bin/java /usr/bin/java

idunno
A: 

When I got this error on Mac osx, it was because I was already using the most up-to-date set of tools. Not sure why it didn't recognize this, but when I unchecked "Display Updates Only" it showed that the available package was version 5, which matched the version listed in Installed Packages.

Jordan