我正在尝试下载android sdk源代码。
以下是我为此做的步骤。
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
PATH=$PATH:~/bin
export PATH
mkdir mydroid
cd mydroid
repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
在终端发出repo init命令后,我收到以下消息 - “未找到清单中的修订版froyo”
我一直在拔出我的头发试图找到同样的解决方案。专家,请帮忙。
我是在Ubuntu环境中这样做的。
专家请帮助解决。
展望未来, 最好的祝福, ANEES
编辑:我也厌倦了主分支,我得到了
anees@Anees-desktop:~/mydroid1$ repo init -u
git://android.git.kernel.org/platform/manifest.git
Traceback (most recent call last):
File "/home/anees/mydroid1/.repo/repo/main.py", line 238, in <module>
_Main(sys.argv[1:])
File "/home/anees/mydroid1/.repo/repo/main.py", line 220, in _Main
repo._Run(argv)
File "/home/anees/mydroid1/.repo/repo/main.py", line 125, in _Run
cmd.Execute(copts, cargs)
File "/home/anees/mydroid1/.repo/repo/subcmds/init.py", line 231, in Execute
self._SyncManifest(opt)
File "/home/anees/mydroid1/.repo/repo/subcmds/init.py", line 119, in _SyncManifest
m.PreSync()
File "/home/anees/mydroid1/.repo/repo/project.py", line 1594, in PreSync
cb = self.CurrentBranch
File "/home/anees/mydroid1/.repo/repo/project.py", line 277, in CurrentBranch
b = self.work_git.GetHead()
File "/home/anees/mydroid1/.repo/repo/project.py", line 1380, in GetHead
fd = open(path, 'rb')
IOError: [Errno 2] No such file or directory: '/home/anees/mydroid1/.repo/manifests/.git/HEAD'
答案 0 :(得分:1)
我已经看过几次这个问题,但通常主要是因为有人试图在同一目录中执行两次“repo init”(或初始化期间出现故障)。 所以如果你得到了一些(Python错误):
Traceback (most recent call last):
File "/home/developer/android_src/.repo/repo/main.py", line 238, in <module>
_Main(sys.argv[1:])
File "/home/developer/android_src/.repo/repo/main.py", line 220, in _Main
repo._Run(argv)
File "/home/developer/android_src/.repo/repo/main.py", line 125, in _Run
cmd.Execute(copts, cargs)
File "/home/developer/android_src/.repo/repo/subcmds/init.py", line 231, in Execute
self._SyncManifest(opt)
File "/home/developer/android_src/.repo/repo/subcmds/init.py", line 143, in _SyncManifest
m.Sync_LocalHalf(syncbuf)
File "/home/developer/android_src/.repo/repo/project.py", line 688, in Sync_LocalHalf
head = self.work_git.GetHead()
File "/home/developer/android_src/.repo/repo/project.py", line 1380, in GetHead
fd = open(path, 'rb')
IOError: [Errno 2] No such file or directory: '/home/developer/android_src/.repo/manifests/.git/HEAD'
然后尝试在新目录中运行相同的命令。这就是为什么错误显示在原始用户的主分支上(Go创建一个新目录并尝试获得主分支)。
但最初的问题是它失败的原因是由于选项“-b froyo”。 “froyo”分支/标签目前似乎不存在。请尝试以下之一:
From git://android.git.kernel.org/platform/manifest
* [new branch] android-1.5 -> origin/android-1.5
* [new branch] android-1.5r2 -> origin/android-1.5r2
* [new branch] android-1.5r3 -> origin/android-1.5r3
* [new branch] android-1.5r4 -> origin/android-1.5r4
* [new branch] android-1.6_r1 -> origin/android-1.6_r1
* [new branch] android-1.6_r1.1 -> origin/android-1.6_r1.1
* [new branch] android-1.6_r1.2 -> origin/android-1.6_r1.2
* [new branch] android-1.6_r1.3 -> origin/android-1.6_r1.3
* [new branch] android-1.6_r1.4 -> origin/android-1.6_r1.4
* [new branch] android-1.6_r1.5 -> origin/android-1.6_r1.5
* [new branch] android-1.6_r2 -> origin/android-1.6_r2
* [new branch] android-2.0.1_r1 -> origin/android-2.0.1_r1
* [new branch] android-2.0_r1 -> origin/android-2.0_r1
* [new branch] android-2.1_r1 -> origin/android-2.1_r1
* [new branch] android-2.1_r2 -> origin/android-2.1_r2
* [new branch] android-2.1_r2.1p -> origin/android-2.1_r2.1p
* [new branch] android-2.1_r2.1p2 -> origin/android-2.1_r2.1p2
* [new branch] android-2.1_r2.1s -> origin/android-2.1_r2.1s
* [new branch] android-2.2.1_r1 -> origin/android-2.2.1_r1
* [new branch] android-2.2.1_r2 -> origin/android-2.2.1_r2
* [new branch] android-2.2.2_r1 -> origin/android-2.2.2_r1
* [new branch] android-2.2_r1 -> origin/android-2.2_r1
* [new branch] android-2.2_r1.1 -> origin/android-2.2_r1.1
* [new branch] android-2.2_r1.2 -> origin/android-2.2_r1.2
* [new branch] android-2.2_r1.3 -> origin/android-2.2_r1.3
* [new branch] android-2.3.1_r1 -> origin/android-2.3.1_r1
* [new branch] android-2.3.2_r1 -> origin/android-2.3.2_r1
* [new branch] android-2.3_r1 -> origin/android-2.3_r1
* [new branch] android-adt-0.9.8 -> origin/android-adt-0.9.8
* [new branch] android-adt-0.9.9 -> origin/android-adt-0.9.9
* [new branch] android-cts-2.1_r2 -> origin/android-cts-2.1_r2
* [new branch] android-cts-2.1_r3 -> origin/android-cts-2.1_r3
* [new branch] android-cts-2.1_r4 -> origin/android-cts-2.1_r4
* [new branch] android-cts-2.1_r5 -> origin/android-cts-2.1_r5
* [new branch] android-cts-2.2_r1 -> origin/android-cts-2.2_r1
* [new branch] android-cts-2.2_r2 -> origin/android-cts-2.2_r2
* [new branch] android-cts-2.2_r3 -> origin/android-cts-2.2_r3
* [new branch] android-cts-2.2_r4 -> origin/android-cts-2.2_r4
* [new branch] android-cts-2.3_r1 -> origin/android-cts-2.3_r1
* [new branch] android-sdk-1.5-pre -> origin/android-sdk-1.5-pre
* [new branch] android-sdk-1.5_r1 -> origin/android-sdk-1.5_r1
* [new branch] android-sdk-1.5_r3 -> origin/android-sdk-1.5_r3
* [new branch] android-sdk-1.6-docs_r1 -> origin/android-sdk-1.6-docs_r1
* [new branch] android-sdk-1.6_r1 -> origin/android-sdk-1.6_r1
* [new branch] android-sdk-1.6_r2 -> origin/android-sdk-1.6_r2
* [new branch] android-sdk-2.0.1-docs_r1 -> origin/android-sdk-2.0.1-docs_r1
* [new branch] android-sdk-2.0.1_r1 -> origin/android-sdk-2.0.1_r1
* [new branch] android-sdk-2.0_r1 -> origin/android-sdk-2.0_r1
* [new branch] android-sdk-2.1_r1 -> origin/android-sdk-2.1_r1
* [new branch] android-sdk-2.2_r1 -> origin/android-sdk-2.2_r1
* [new branch] android-sdk-2.2_r2 -> origin/android-sdk-2.2_r2
* [new branch] android-sdk-tools_r2 -> origin/android-sdk-tools_r2
* [new branch] android-sdk-tools_r3 -> origin/android-sdk-tools_r3
* [new branch] android-sdk-tools_r4 -> origin/android-sdk-tools_r4
* [new branch] android-sdk-tools_r5 -> origin/android-sdk-tools_r5
* [new branch] android-sdk-tools_r6 -> origin/android-sdk-tools_r6
* [new branch] android-sdk-tools_r7 -> origin/android-sdk-tools_r7
* [new branch] cdma-import -> origin/cdma-import
* [new branch] cupcake -> origin/cupcake
* [new branch] cupcake-release -> origin/cupcake-release
* [new branch] donut -> origin/donut
* [new branch] donut-plus-aosp -> origin/donut-plus-aosp
* [new branch] eclair -> origin/eclair
* [new branch] froyo-plus-aosp -> origin/froyo-plus-aosp
* [new branch] gingerbread -> origin/gingerbread
* [new branch] master -> origin/master
* [new branch] release-1.0 -> origin/release-1.0
* [new branch] tools_r7 -> origin/tools_r7
* [new branch] tools_r8 -> origin/tools_r8
* [new branch] tools_r9 -> origin/tools_r9
* [new tag] android-1.5 -> android-1.5
* [new tag] android-1.5r2 -> android-1.5r2
* [new tag] android-1.5r3 -> android-1.5r3
* [new tag] android-1.5r4 -> android-1.5r4
* [new tag] android-1.6_r1 -> android-1.6_r1
* [new tag] android-1.6_r1.1 -> android-1.6_r1.1
* [new tag] android-1.6_r1.2 -> android-1.6_r1.2
* [new tag] android-1.6_r1.3 -> android-1.6_r1.3
* [new tag] android-1.6_r1.4 -> android-1.6_r1.4
* [new tag] android-1.6_r1.5 -> android-1.6_r1.5
* [new tag] android-1.6_r2 -> android-1.6_r2
* [new tag] android-2.0.1_r1 -> android-2.0.1_r1
* [new tag] android-2.0_r1 -> android-2.0_r1
* [new tag] android-2.1_r1 -> android-2.1_r1
* [new tag] android-2.1_r2 -> android-2.1_r2
* [new tag] android-2.1_r2.1p -> android-2.1_r2.1p
* [new tag] android-2.1_r2.1p2 -> android-2.1_r2.1p2
* [new tag] android-2.1_r2.1s -> android-2.1_r2.1s
* [new tag] android-2.2.1_r1 -> android-2.2.1_r1
* [new tag] android-2.2.1_r2 -> android-2.2.1_r2
* [new tag] android-2.2.2_r1 -> android-2.2.2_r1
* [new tag] android-2.2_r1 -> android-2.2_r1
* [new tag] android-2.2_r1.1 -> android-2.2_r1.1
* [new tag] android-2.2_r1.2 -> android-2.2_r1.2
* [new tag] android-2.2_r1.3 -> android-2.2_r1.3
* [new tag] android-2.3.1_r1 -> android-2.3.1_r1
* [new tag] android-2.3.2_r1 -> android-2.3.2_r1
* [new tag] android-2.3_r1 -> android-2.3_r1
* [new tag] android-adt-0.9.8 -> android-adt-0.9.8
* [new tag] android-adt-0.9.9 -> android-adt-0.9.9
* [new tag] android-cts-2.1_r2 -> android-cts-2.1_r2
* [new tag] android-cts-2.1_r3 -> android-cts-2.1_r3
* [new tag] android-cts-2.1_r4 -> android-cts-2.1_r4
* [new tag] android-cts-2.1_r5 -> android-cts-2.1_r5
* [new tag] android-cts-2.2_r1 -> android-cts-2.2_r1
* [new tag] android-cts-2.2_r2 -> android-cts-2.2_r2
* [new tag] android-cts-2.2_r3 -> android-cts-2.2_r3
* [new tag] android-cts-2.2_r4 -> android-cts-2.2_r4
* [new tag] android-cts-2.3_r1 -> android-cts-2.3_r1
* [new tag] android-sdk-1.5-pre -> android-sdk-1.5-pre
* [new tag] android-sdk-1.5_r1 -> android-sdk-1.5_r1
* [new tag] android-sdk-1.5_r3 -> android-sdk-1.5_r3
* [new tag] android-sdk-1.6-docs_r1 -> android-sdk-1.6-docs_r1
* [new tag] android-sdk-1.6_r1 -> android-sdk-1.6_r1
* [new tag] android-sdk-1.6_r2 -> android-sdk-1.6_r2
* [new tag] android-sdk-2.0.1-docs_r1 -> android-sdk-2.0.1-docs_r1
* [new tag] android-sdk-2.0.1_r1 -> android-sdk-2.0.1_r1
* [new tag] android-sdk-2.0_r1 -> android-sdk-2.0_r1
* [new tag] android-sdk-2.1_r1 -> android-sdk-2.1_r1
* [new tag] android-sdk-2.2_r1 -> android-sdk-2.2_r1
* [new tag] android-sdk-2.2_r2 -> android-sdk-2.2_r2
* [new tag] android-sdk-tools_r2 -> android-sdk-tools_r2
* [new tag] android-sdk-tools_r3 -> android-sdk-tools_r3
* [new tag] android-sdk-tools_r4 -> android-sdk-tools_r4
* [new tag] android-sdk-tools_r5 -> android-sdk-tools_r5
* [new tag] android-sdk-tools_r6 -> android-sdk-tools_r6
* [new tag] android-sdk-tools_r7 -> android-sdk-tools_r7
答案 1 :(得分:0)
尝试删除-b froyo
:
repo init -u git://android.git.kernel.org/platform/manifest.git
答案 2 :(得分:0)
像SillentTroll建议的那样,您可能需要在系统上安装更多软件。这些是您需要的大部分工具:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g ++ - multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
我发现本教程非常有用:Compile ICS Tutorial
答案 3 :(得分:-1)
如果你得到“没有这样的文件或目录”,那么尝试安装“git-core”。 它对我有用。