简体   繁体   中英

How to update Android Studio .jar file?

I want to update my Android Studio from v0.1 to v0.2.5 and download the .jar file from here .

How to reload .jar file in Android Studio?

Note: There is not a patch update available from 0.1.9 to 0.2. To update from Android Studio 0.1.x to 0.2.x, you must install a new Android Studio bundle from this page. The reason for that is that we have made changes to the bundled SDK such that it includes a pre-configured local Maven repository which can serve up the v4 support library and which is required for creating new projects.

From http://developer.android.com/sdk/installing/studio.html#Revisions

So why not downloading a new version of Android Studio?

Update : If you can't update by network. Try this:

java -classpath /path/to/AI-130.687321-130.692269-patch-unix.jar com.intellij.updater.Runner install $PWD

From https://code.google.com/p/android/issues/detail?id=56068

Running Windows 8 (as a local admin), I needed patch from a reasonably recent version to 0.9.2. However I ran into the "unable to delete files" issue when trying to patch directly from within Android Studio (running as admin). After doing the 100 MEG download twice (Aussie slow Internet), I needed something smarter. Follows is what worked for me (your mileage may vary):

  1. I found the download JAR in my C:\\Users\\MYUSERNAME\\AppData\\Local\\Temp directory. It had a strange extension, but was obviously the patch file from the files date/time stamp.
  2. So I copied this file into a nice directory (c:\\temp), renaming the extension to ".jar"
  3. My install of Android Studio is in c:\\program files (x86)\\Android\\android-studio - so using Windows Explorer I gave the "everyone" user full control of the folder and all sub-folders. Yes I know this is bad practice on a prod server but hear me out.
  4. I open up a command window in c:\\temp and entered the following command line (where the .jar file name was the JAR file I found and renamed):

    java -classpath jetbrains.patch.jar.androidstudio.jar install "c:\\program files (x86)\\Android\\android-studio"

  5. This commenced the patch which completed successfully. Giving "everyone" full control meant that the delete operations completed okay - at least that's my belief. I remove the everyone access after the patch completed (I bet you thought I'd forget to do this!).

  6. Started up Android Studio and checked the version which is now current - PHEW!

Best of luck with manually patching on Windows 8. I really love Android Studio, but its definitely on the clunky side in this regard.

Copy the new jar file to app\\libs folder. Make sure in your build.gradle (app), you import the file under dependencies section:

dependencies {
...
implementation files ('libs/myfile.jar')

Do a File | Invalidate caches / restart to refresh the jar file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM