14

I think i follow instruction from this site very carefully

http://source.android.com/source/downloading.html

but when i try this

repo init -u https://android.googlesource.com/platform/manifest

i got the following error.

 repo init -u https://android.googlesource.com/platform/manifest -b froyo 
/root/bin/repo: line 1: syntax error near unexpected token `newline' 
/root/bin/repo: line 1: `<?xml version="1.0" encoding="utf-8"?>'enter code here`

I tried several times but no luck from the very begining. What happened?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
minhaz
  • 4,233
  • 3
  • 33
  • 49
  • 10
    The grandstanding of the people who took the liberty to close this question is just incredible and unfortunately all too common on SO. It is perfectly clear what is being asked: me and another commenter had no problem understanding the question. – olefevre Nov 10 '11 at 17:18
  • 4
    voted to reopen: this question and answer are useful. – Heath Hunnicutt Jan 27 '12 at 22:32
  • This question should be opened. The question is clear and precise. Answer is also clear. – Vincent Vettukal Jul 08 '12 at 22:14
  • I had the same problem. The instruction curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo , might fail. In that case the repo command might be an html page with 'resource not found'. Just see what is in the repo file (it sould be a python script, not an HTML page vi \~bin\repo ). If this is not the python script see if you can resolve the curl download request first. – Sentient Dec 10 '12 at 19:09

1 Answers1

17

Check your repo file.

Sometimes the server would return a "server loading too high" page instead of giving you the repo script. In this case, you have to download your repo file again.

Alternativly, you can get the source of repo from git:

git clone https://android.googlesource.com/tools/repo
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
J-16 SDiZ
  • 26,473
  • 4
  • 65
  • 84
  • 1
    Yes, do check your repo file. It is a python script, not an HTML or XML file, so if you are getting an error message that quotes bits of HTML or XML when trying to use repo, odds are when you tried to fetch the repo script in the first place the server responded with a 301 or 404 error message, hence the XML/HTML. The instructions on http://source.android.com/ should have the correct location (it changes often; Google is unfortunately not a class act but a bit messy). – olefevre Nov 10 '11 at 17:15