首页 > code, 技术相关 > 墙内的Linux(Ubuntu)环境下安装Eclipse+Android SDK(ADT)教程

墙内的Linux(Ubuntu)环境下安装Eclipse+Android SDK(ADT)教程

2011年4月29日 发表评论 阅读评论

最近几天想玩玩Android开发,于是试着在Linux下装Adroid SDK,无奈,由于Android SDK(ADT)的网站被墙了,不能直接在Eclipse的Install New software里安装,几经折腾,终于在linux下安装好了Adroid SDK,在这里分享下,希望对有些人有用,能少走些弯路。

  1. 下载最新的Eclipse 3.6.2(注意,最好是javaEE的),点这里下载.
  2. 下载ADT-0.9.9,地址:http://dl-ssl.google.com/android/ADT-0.9.9.zip。本来是可以直接在Eclipse输入https://dl-ssl.google.com/android/eclipse在线安装的,但由于万恶的墙,我这里不行,总出现fetch error。
  3. 进入Eclipse->Help->Install Software进入Install面板,点Add,点archive,将下载的ADT安装。
  4. 下载Android SDK for linux包,地址:http://dl.google.com/android/android-sdk_r10-linux_x86.tgz
  5. 下载后的SDK不是完整的,需要下载一些其他文件,如api,platforms,本来这是可以直接在SDK Manager里直接更新的,但是由于被墙了,会出现Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml。网上有的方法是设置代理服务器,但我这里没用,只好作罢。
  6. 进入http://dl-ssl.google.com/android/repository/repository.xml,然后在xml中逐个寻找linux系统的文件,在迅雷里面直接下载下面文件并按下面方法安装(推荐迅雷,否则速度接近20k,拖1G的SDK够你受的)。下面是具体的文件列表(以下文件夹没有可以自行创建) :
  7. 各个API版本,直接解压到add-ons(这个文件夹是上面的android-sdk_r10-linux_x86.tgz解压后得到有):
  8. 各个platforms版本,我只下了两个,解压到platforms:
  9. platform-tools和tools,解压到对应文件夹:
  10. docs和samples以及market_licensing,解压到对应文件夹: http://dl-ssl.google.com/android/repository/docs-2.2_r01-linux.zip
  11. 以上文件,要是有几个都解压到相同目录的,则保持原来的文件夹顶层,直接考进去,如google_apis-8_r02.zip 解压到google_apis-8,则直接放入add-ons目录,否则的话,则先将顶层去掉,放入,如docs,tools,platform-tools,market_licensing.
  12. 在Eclipse中指定(前提是按2,3两步安好了ADT)SDK目录(help->preference->android),点apply,出现sdk则成功,有时会出现(在tools的adb找不到,,只需要将platforms-tools里面的adb拷一份到tool是目录即可)。
  13. 将tools和platform-tools加入到环境变量中。

另外,我在开发中,发现用ubuntu通过ADB一开始无法连接手机,通过lsusb能发现手机能连上,通过adb device命令得到“???? no permission”的提示,这主要因为权限问题,需要先通过adb kill-server停止adb守护进程,再用sudo adb start-server启动adb。(前提是将adb加入到了root环境变量中,而这最简单的方法是通过ln –s /usr/bin/adb  /path/to/adb 在bin下创建一个到adb的软链接)。

本文作者: Sigma    在新浪微博关注SigmaSigmaWeibo    RSS订阅本博客
本文链接: http://www.sigma.me/2011/04/29/linux-install-android-sdk.html

  1. 2011年5月1日08:10 | #1


  2. 2011年5月1日12:39 | #2




  3. 2011年5月1日01:20 | #3

    孙:唉~好吧 dolf你…. 广告这么多?!

    dolf:爷的广告 略多略多…



    不行不行 你的广告绝对不可以

    不是大家一样没钱赚 不就没有意义了么



  4. 2011年5月1日03:01 | #4



  5. 2011年4月29日21:22 | #5


  6. 2011年5月1日03:02 | #6





  7. 2011年5月4日09:39 | #7


  8. 2011年5月4日14:04 | #8


  9. 2011年5月4日15:51 | #9



  10. 2011年6月7日14:15 | #10


  11. 2011年6月7日15:11 | #11



  12. 2019年1月9日08:26 | #12

    I am writing to make you understand what a remarkable encounter my wife’s princess gained reading yuor web blog. She mastered several details, which included what it is like to have an excellent helping heart to have the others quite simply thoroughly grasp some hard to do things. You actually did more than visitors’ desires. Many thanks for offering the effective, healthy, explanatory and even fun tips about your topic to Evelyn.

  13. 2019年1月10日05:51 | #13

    I actually wanted to write a small comment to thank you for all of the splendid tips and tricks you are showing at this website. My time consuming internet investigation has finally been compensated with pleasant details to exchange with my pals. I would state that that we website visitors are undeniably blessed to dwell in a decent place with very many wonderful individuals with helpful concepts. I feel really grateful to have discovered the webpages and look forward to plenty of more fun times reading here. Thank you once again for a lot of things.

  14. 2019年1月11日01:46 | #14

    I want to show my gratitude for your generosity giving support to persons who should have assistance with that issue. Your special commitment to passing the solution all around was unbelievably good and has really empowered most people much like me to realize their pursuits. Your amazing warm and friendly suggestions implies a great deal a person like me and much more to my peers. Thank you; from everyone of us.

  15. 2019年1月11日14:06 | #15

    I precisely wished to thank you so much again. I’m not certain the things I might have taken care of in the absence of these recommendations shown by you over my topic. Certainly was a fearsome concern in my opinion, but viewing your well-written avenue you solved the issue made me to leap for fulfillment. Extremely grateful for your information and even sincerely hope you recognize what a powerful job your are undertaking educating the others through the use of your site. I’m certain you have never met any of us.

  16. 2019年1月11日18:55 | #16

    My wife and i felt really ecstatic Ervin managed to carry out his reports by way of the ideas he discovered from your own site. It is now and again perplexing just to possibly be releasing secrets and techniques which the rest may have been trying to sell. Therefore we recognize we have got the writer to be grateful to because of that. All the illustrations you made, the straightforward web site navigation, the relationships you will make it possible to engender – it’s most remarkable, and it’s leading our son in addition to the family imagine that the subject is excellent, and that is very mandatory. Thanks for the whole thing!

  17. 2019年1月12日12:16 | #17

    I intended to put you this tiny note just to say thanks the moment again about the pleasant solutions you have contributed in this article. It is certainly pretty generous of people like you in giving freely exactly what a lot of people could possibly have advertised for an electronic book to help make some bucks on their own, most notably seeing that you might well have tried it if you ever desired. These ideas additionally worked as a good way to be sure that other individuals have similar desire really like mine to grasp good deal more regarding this matter. I think there are thousands of more enjoyable occasions ahead for many who check out your blog.

  18. 2019年1月13日08:17 | #18

    I want to show thanks to this writer just for bailing me out of this type of problem. After browsing through the search engines and obtaining tips that were not pleasant, I assumed my life was over. Living minus the strategies to the difficulties you’ve resolved all through your main short article is a serious case, and the kind that could have in a negative way damaged my entire career if I had not discovered your blog. The understanding and kindness in dealing with every item was vital. I don’t know what I would have done if I had not come across such a solution like this. I’m able to at this time look forward to my future. Thank you so much for this specialized and sensible guide. I won’t hesitate to propose the blog to anybody who needs tips about this area.

  19. 2019年1月14日04:35 | #19

    I must point out my love for your kind-heartedness supporting folks who must have guidance on this particular subject matter. Your special dedication to getting the message all through had become especially good and have specifically empowered ladies just like me to reach their targets. Your amazing valuable help entails a whole lot a person like me and even further to my office workers. Regards; from each one of us.

  20. 2019年2月8日06:09 | #20

    I simply want to mention I am just very new to blogging and site-building and certainly loved this website. Most likely I’m want to bookmark your site . You surely come with wonderful article content. Kudos for sharing with us your web page.

  21. 2019年2月11日02:58 | #21

    You really make it seem really easy with your presentation but I in finding this matter to be actually one thing that I think I’d by no means understand. It kind of feels too complex and very huge for me. I am looking ahead for your subsequent submit, IЎ¦ll try to get the hang of it! rentacarkosovo

  22. 2019年2月11日19:57 | #22

    When I originally commented I clicked the -Notify me when new comments are added- checkbox and now if a comment is added I receive four emails concentrating on the same comment. Perhaps there is any way you may remove me from that service? Thanks!

  23. 2019年2月16日12:10 | #23

    I think one of your adverts caused my internet browser to resize, you might want to put that on your blacklist.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.