1

I am creating a USB with all the tools I need for a Linux-based development environment, including the Android SDK. When I run ./android, I get the following error

Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: invalid character at position 2 in 08
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-7.xml, reason: NumberFormat invalid character at position 2 in 08
Done loading packages.
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml

What does "invalid character at position 2" mean and how do I fix it?

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268

2 Answers2

2

It means that you have an unsupported JVM, probably Gij. Install the OpenJDK JRE or the Sun Oracle JRE, and make sure that java on your path is that one.

Thanks to ch… in Issue 37989: tools/android update sdk --no-ui won't work (and I confirm).

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
1

I've found a solution that worked for me on linux.

1) Check your java version: java -version, for me appears this one java version "1.5.0" gij (GNU libgcj) version 4.6.3

As I has installed the version jdk1.6.0_24 I wanted to have that version when I do java -version so I've looked in PATH variable (echo $PATH) and I've realized that the inclusion of my jdk1.6.0_24 was at the end of the path. So I included the path to my jdk1.6.0_24 to be at the beginning to the PATH variable.

Now when I run: java -version, appears: java version "1.6.0_24"

2) Now go to your Android sdk folder (.../sdk/tools/) and run ./android

In my case the Android SDK Manager opened without problem.

I hope it helps!

When

Martín C
  • 1,027
  • 1
  • 9
  • 13