解決android studio升級失敗提示 Connection failed方法

來源:互聯網
上載者:User

關於這個問題,查了不少地方,發現解決方案都差不多,但或多或少有些問題或沒說清楚。關於在windows系統中的解決方案,基本沒什麼問題,都是如下修改:

在Android Studio安裝目錄“/bin/studio.exe.vmoptions”檔案中追加以下幾行


-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/

但有點要注意,64位系統就應該修改“/bin/studio64.exe.vmoptions”這個檔案。
而下面主要說明修改mac中的升級問題:

在Mac和Linux版本中,網上提供的解決辦法,差不多都是如下修改:
直接修改環境變數:


$ export REQUIRED_JVM_ARGS="-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=http://dl.google.com/android/studio/patches/"
$ bin/studio

此方法多次嘗試,均以失敗告終。最後不得不自行想辦法解決,發現如下修改可解決這個問題:

在“/Applications/Android Studio.app”中,右鍵點擊“顯示包內容”,開啟“/bin/idea.vmoptions”檔案,在後面追加入windows中的內容,即:

-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/
後儲存退出,重新開啟Android Studio,Check for Updates …就可以看到升級提示了。

註:此方法只是自己摸索嘗試在本機上可行,非官方提供,失敗勿噴,謝謝!a

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.