離線更新Android Studio打賞

手動更新適合以下場景:
1. 目前版本與Gradle版本不一致。
2. 錯誤 IllegalStateException: Can’t deserialize target data of key ‘IdeaAndroidProject’.
Given class loaders: [PluginClassLoader[org.jetbrains.android, 10.0]]:
3. 新建工程出錯,在線更新更新失敗。
4. 無外網,不能在線更新。

我們采用離線更新的方法解決:

1.獲取安裝的Android Studio 的Build Number
如果已經安裝了Android Studio,那么我們只需要增量更新即可。所以下載更新jar包即可,首先要知道自己當前的Android Studio的版本號,Help-》About。

Build #AI-135.1404660 135.1404660即為版本號

2.查詢目前官方Android Studio的最新版本號

(1)訪問網站http://tools.android.com/recent可查看最新的Build Number,或者
(2)訪問https://dl.google.com/android/studio/patches/updates.xml查看最新的版本號,目前筆者獲得的最新xml數據如下。

<products>
<product name="Android Studio">
<code>AI</code>
<channel id="AI-0-eap"
name="Android Studio updates"
status="eap"
url="http://tools.android.com/recent"
feedback="https://code.google.com/p/android/issues/entry?template=Android+Studio+bug"
majorVersion="0">
<build number="135.1446794" version="0.8.11">
<message><![CDATA[<html>
A new Android Studio
0.8.11
is available in the canary channel.<p/>
Canary builds are the bleeding edge, released about weekly. While these builds do get tested,<br/>
they are still subject to bugs, as we want people to see what's new as soon as possible.<br/>
<p/>
For slightly more predictable builds, use <b>Settings | Updates</b> and select the <b>Dev Channel</b>.
</html>]]>
</message>
<button name="Download" url="http://tools.android.com/download/studio/canary/latest/" download="true" />
<button name="Release Notes" url="http://tools.android.com/recent" />
<patch from="135.1248636" size="12" exclusions="mac" />
<patch from="135.1267975" size="12" exclusions="mac" />
<patch from="135.1281642" size="12" exclusions="mac" />
<patch from="135.1295215" size="7" exclusions="mac" />
<patch from="135.1331330" size="7" exclusions="mac" />
<patch from="135.1339820" size="5" exclusions="mac" />
<patch from="135.1371801" size="5" exclusions="mac" />
<patch from="135.1391024" size="1" exclusions="mac" />
<patch from="135.1404660" size="1" exclusions="mac" />
<patch from="135.1428667" size="Windows/Linux: 1MB, Mac: 160" />
</build>
</channel>
<channel id="AI-0-dev-channel"
name="Android Studio updates"
status="milestone"
url="http://tools.android.com/recent"
feedback="https://code.google.com/p/android/issues/entry?template=Android+Studio+bug"
majorVersion="0">
<build number="135.1404660" version="0.8.9">
<message><![CDATA[<html>
A new Android Studio
0.8.9
is available in the dev channel.<p/>
Dev channel builds are hand-picked older canary builds that survived the test of time.
</html>]]>
</message>
<button name="Download" url="http://developer.android.com/sdk/installing/studio.html" download="true" />
<button name="Release Notes" url="http://tools.android.com/recent" />
<patch from="135.1245622" size="11" />
<patch from="135.1248636" size="11" />
<patch from="135.1267975" size="11" />
<patch from="135.1281642" size="7" />
<patch from="135.1295215" size="7" />
<patch from="135.1331330" size="4" />
<patch from="135.1339820" size="4" />
<patch from="135.1371801" size="1" />
<patch from="135.1391024" size="1" />
</build>
</channel>
<channel id="AI-0-beta"
name="Android Studio updates"
status="beta"
url="http://tools.android.com/recent"
feedback="https://code.google.com/p/android/issues/entry?template=Android+Studio+bug"
majorVersion="0">
<build number="135.1404660" version="0.8.9">
<message><![CDATA[<html>
A new Android Studio
0.8.9
is available in the beta channel.<p/>
</html>]]>
</message>
<button name="Download" url="http://developer.android.com/sdk/installing/studio.html" download="true" />
<button name="Release Notes" url="http://tools.android.com/recent" />
<patch from="135.1245622" size="11" />
<patch from="135.1248636" size="11" />
<patch from="135.1267975" size="11" />
<patch from="135.1281642" size="7" />
<patch from="135.1295215" size="7" />
<patch from="135.1331330" size="4" />
<patch from="135.1339820" size="4" />
<patch from="135.1371801" size="1" />
<patch from="135.1391024" size="1" />
</build>
</channel>
</product>
</products>

從返回的xml數據可知目前最新的Build Number 為135.1446794。

3.下載增量更新包
獲得版本號,我們就可以下載更新包了,我的更新包下載地址為
https://dl.google.com/android/studio/patches/AI-135.1404660-135.1446794-patch-win.jar
格式為AI-$FROM-$TO-patch-win.jar,其中$FROM為你當前android studio的build number,$TO為最新的android studio 的build number。

4.安裝更新包
將下載的更新包拷貝至Android Studio 的安裝目錄,將下載的jar拷貝到該目錄下

5、然后打開命令行提示符,cd到Android Studio 的安裝目錄,鍵入如下命令

java -classpath AI-135.1404660-135.1446794-patch-win.jar com.intellij.updater.Runner install .

.代表當前目錄。即Android Studio 的安裝目錄。
安裝完畢后,你可以重新啟動Android Studio,然后Help-》about查看是不是更新到135.1446794了!

收集自網絡

離線更新Android Studio
文章《離線更新Android Studio》二維碼
  • 微信打賞
  • 支付寶打賞

已有6條評論

  1. 愛奇趣—分享精選奇聞趣事

    總結的不錯

    2014-10-23 17:08 回復
  2. 偏方大全qianjinpianfang.com

    離線也能更新啊?

    2014-10-18 11:27 回復
  3. gank 開黑吧

    gank開黑吧http://www.kaihei8.com 贊一下擼主哈哈 好多

    2014-10-15 23:01 回復
  4. 三明治網布

    密密麻麻的看不懂

    2014-10-11 10:43 回復

(必填)

(必填)

(可選)

黑龙江22选5开奖