开发者

git clone: How do I clone an Android 2.2 compatible branch of Browser?

I managed to clone the latest & greatest version of Android开发者_Go百科's Browser source code, using:

  git clone git://android.git.kernel.org/platform/packages/apps/Browser.git

The problem now is that, with my system (and emulator) setup for 2.2, Eclipse complains about errors in the cloned package. I suspect those errors come from incompatibility between the latest Browser code and the older Android 2.2.

How do I find the list of available Git branches for Android?

What else do I need to do to fetch the exact Browser version that is compatible with Android 2.2?


How do I find the list of available Git branches for Android?

git remote show origin

What else do I need to do to fetch the exact Browser version that is compatible with Android 2.2?

Since you cloned it, you’ve already fetched all of the branches. But you can use this command to fetch just the branch you need:

git fetch origin froyo:froyo

And once you have fetched it, use this command to check it out:

git checkout froyo

Next time, you can get the branch you want in one step with

git clone -b froyo git://android.git.kernel.org/platform/packages/apps/Browser.git

This will fetch every branch as well, but that’s not a big deal.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜