ANDROID_HOME is not set and "android" command not in your PATH解決

來源:互聯網
上載者:User

標籤:

使用nodejs安裝cordova後在項目裡面添加平台時出現錯誤:

原因就是沒有配環境變數

使用phonegap開發不僅要配JDK環境變數,還要配ADT環境變數,出現這個錯誤很顯示就是沒配ADT環境變數導致

後來在網上找到資料(很多不完整),總結瞭解決方案:

【第一】配置環境變數(綠色文字標出代碼,路徑換為自己的SDK路徑)

ANDROID_HOME =  D:\Android\adt-bundle3\adt-bundle-windows-x86-20131030\sdk

ANDROID_PLATFORM_TOOLS = D:\Android\adt-bundle3\adt-bundle-windows-x86-20131030\sdk\platform-tools

ANDROID_TOOLS = D:\Android\adt-bundle3\adt-bundle-windows-x86-20131030\sdk\tools

最後在PATH變數中添加(很重要,一定要3個都添加):;%ANDROID_HOME%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%

【第二】重啟CMD

變數配完後,開始最後很重要的一步:關閉上面報錯的CMD視窗,重新開啟敲命令(之前因為沒關閉,而導致浪費很多時間,而百度出來的資料沒有說關閉這個視窗重新開啟的)

 

如果看到如結果說明我們成功了!如果有什麼問題歡迎回帖討論。

 

參考:

http://stackoverflow.com/questions/26356359/error-android-home-is-not-set-and-android-command-not-in-your-path-you-must-ful

http://my.oschina.net/u/1266171/blog/360299

http://www.tuicool.com/articles/F7RJNf

ANDROID_HOME is not set and "android" command not in your PATH解決

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.