2009年7月1日 星期三

安裝 Android 的開發環境

要進入Android世界, 首先就是要把開發環境準備好.
根據書上說明, 在我的 win xp 下, 要有下列幾項軟體工具:

1. Java Development Kit (JDK) v6.0 以上
2. Android SDK 1.0r2 以上
3. Eclipse IDE 程式.

以上3項可以分別在:
http://java.sun.com/javase/downloads/index.jsp
http://developer.android.com/index.html
http://www.eclipse.org/downloads/

中下載.

由於資訊科技日新月異, 軟體版本也更新的很快. 所以原廠提供的最新版本應該都和書上說的不同.
但因為不想冒太大風險, 所以我就盡量按照書上類似的的版本.
我採用的是:
jdk-6u14-windows-i586.exe (JDK 6 Update 14);
android-sdk-windows-1.5_r2.zip (Android 1.5 SDK, Release 2); (註:.1.1 r1好像有小問題, 先不研究)
eclipse-jee-ganymede-SR2-win32.zip (Eclipse IDE for Java EE Developers).

下載完畢後.接下來就是要安裝這些軟體:

JDK安裝還算容易, 點一點就完成了.也沒有特別修改它內定存放的目錄.
Android SDK及 eclipse 都只要解壓縮放到想放的目錄就可以了.
基本上我是放到 C:\android 及 C:\eclipse 上.

另外還要設定一下系統環境變數:
就是將 "C:\android\tools" 及 "C:\Program Files\Java\jdk1.6.0_14\bin" 加入windows系統變數的 path 中.
設定的步驟: [我的電腦] -->[內容]-->[進階]-->[環境變數]






接著就是要啟動 Eclipse.
開啟 Eclipse 不是那麼順利, 有個 error code的視窗出現. 程式沒辦法開啟. (書上沒有特別說明, 要注意些什麼是ㄚ!). 也許是因為我沒玩過 java 的開發環境也有關係.

錯誤訊息的第一行是:
JVM Terminated. Exit Code=-1.

好不容易在網路上找到解決的方式. 就是把 eclipse.ini 中的 "-Xmx512m" 改為 "-Xmx256m" .

改好後. 再次啟動就沒問題了.
進入 Eclipse 後還要做幾個設定:
剛進入時會問工作空間 workspace 的位置, 若沒問題就用內定的就好了.
Eclipse開啟後, 要先下載 Android Development Tools plugin.
下載的步驟:
[help]--> [Software Updates] --> [Available Software] --> 右邊的[Add Site]
在 Location 填寫 https://dl-ssl.google.com/android/eclipse 按 [OK] 後 Available Software 就增加選項, 再將 Android DDMSAndroid Development Tools 選擇打勾, 按[Install] 安裝.
安裝完畢後, 會要重新啟動. 這樣 ADT 就安裝啟用完成了.

在正式建立 Android 專案之前, 要先設定一下 Android SDK的路徑:
[Windows]--> [Preferences] --> 左邊選 Android --> 按[Browse..] 選擇原先放置 Android的目錄 (我的是 C:\android ).
確定後 按 [Apply] , [OK] 就完成設定了.

這樣就可以開始正式建立 Android 專案了.

51 則留言:

  1. Existing without the answers to the difficulties you’ve sorted out through this guide is a critical case, as well as the kind which could have badly affected my entire career if I had not discovered your website.
    href="http://www.besanttechnologies.in/digital-marketing-training-in-chennai">Digital Marketing Training in Chennai

    回覆刪除
  2. Really you have done great job,There are may person searching about that now they will find enough resources by your post
    AWS Training in chennai

    AWS Training in bangalore

    回覆刪除
  3. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
    Blueprism training in velachery

    Blueprism training in marathahalli


    AWS Training in chennai

    回覆刪除
  4. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
    python online training
    python training in OMR
    python training in tambaram

    回覆刪除
  5. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 

    Devops training in sholinganallur

    回覆刪除
  6. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.
    python training in pune | python training institute in chennai | python training in Bangalore

    回覆刪除
  7. Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

    DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

    Good to learn about DevOps at this time.


    devops training in chennai | devops training in chennai with placement | devops training in chennai omr | devops training in velachery | devops training in chennai tambaram | devops institutes in chennai | devops certification in chennai | trending technologies list 2018

    回覆刪除
  8. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. 

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    回覆刪除
  9. I am really very happy to find this particular site. I just wanted to say thank you for this huge read!! I absolutely enjoying every petite bit of it and I have you bookmarked to test out new substance you post.
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training

    回覆刪除
  10. Very informative and helpful post and you are obviously very knowledgeable in this field. Very useful and solid content. Thanks for sharing


    Data Science Bangalore

    回覆刪除



  11. Really impressed! Everything is very open and very clear clarification of issues. It contains truly facts. Your website is very valuable. Thanks for sharing.
    DATA SCIENCE COURSE MALAYSIA

    回覆刪除
  12. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
    www.technewworld.in

    回覆刪除
  13. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    www.technewworld.in
    How to Start A blog 2019
    Eid AL ADHA

    回覆刪除
  14. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging !!
    Andorid Training in Chennai | Android Training Institute in Chennai

    回覆刪除
  15. I love your article so much. Good job
    Participants who complete the assignments and projects will get the eligibility to take the online exam. Thorough preparation is required by the participants to crack the exam. ExcelR's faculty will do the necessary handholding. Mock papers and practice tests will be provided to the eligible participants which help them to successfully clear the examination.

    Excelr Solutions

    回覆刪除
  16. Nice post. Thanks for sharing the valuable information. it’s really helpful for me.Keep sharing on updated posts!!
    Machine Learning Training in Bangalore

    回覆刪除
  17. Attend The Data Analytics Courses in Bangalore From ExcelR. Practical Data Analytics Courses in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses in Bangalore.
    ExcelR Data Analytics Courses in Bangalore

    回覆刪除
  18. I learned World's Trending Technology from certified experts for free of cost. I Got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from Data science training in btm layout experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying hkbk group of institutions

    回覆刪除
  19. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.

    business analytics course

    data analytics courses in mumbai

    data science interview questions

    data science course in mumbai

    回覆刪除
  20. This was really one of my favorite website. ExcelR Machine Learning Course In Pune Please keep on posting.

    回覆刪除
  21. Howdy! This blog post could not be written any better! Looking at this article reminds me of my previous roommate! He always kept preaching about this.thns for ur info.
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    回覆刪除



  22. Nice article and thanks for sharing with us. Its very informative

    Plots in TUKKUGUDA

    回覆刪除
  23. I genuinely appreciated understanding it. Sitting tight for some more incredible articles like this from you in the nearing days.

    Best Data Science Training Institute in Pune
    best data science training institute in bangalore

    回覆刪除
  24. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Anyway, I’ll be subscribing to your feed and I hope you post again soon.
    business analytics training in hyderabad

    回覆刪除
  25. Explore the ultimate voice communication platform with our Mumble Server. Experience crystal-clear audio and seamless collaboration today!

    回覆刪除