[英]How to update Android Studio .jar file?
Note: There is not a patch update available from 0.1.9 to 0.2.
注意:没有补丁更新,从0.1.9到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.
要从Android Studio 0.1.x更新到0.2.x,您必须从此页面安装新的Android Studio捆绑包。 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.
原因是我们对捆绑的SDK进行了更改,使其包含预先配置的本地Maven存储库,该存储库可以提供v4支持库,这是创建新项目所必需的。
From http://developer.android.com/sdk/installing/studio.html#Revisions 来自http://developer.android.com/sdk/installing/studio.html#Revisions
So why not downloading a new version of Android Studio? 那么为什么不下载新版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
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 来自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. 运行Windows 8(作为本地管理员),我需要从最新版本的补丁到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).
但是,当我尝试直接从Android Studio(以管理员身份运行)进行修补时,我遇到了“无法删除文件”的问题。 After doing the 100 MEG download twice (Aussie slow Internet), I needed something smarter.
在完成100次MEG下载(Aussie slow Internet)后,我需要更聪明的东西。 Follows is what worked for me (your mileage may vary):
跟随对我有用(你的里程可能会有所不同):
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): 我在c:\\ temp中打开一个命令窗口并输入以下命令行(其中.jar文件名是我找到并重命名的JAR文件):
java -classpath jetbrains.patch.jar.androidstudio.jar install "c:\\program files (x86)\\Android\\android-studio" java -classpath jetbrains.patch.jar.androidstudio.jar安装“c:\\ program files(x86)\\ Android \\ android-studio”
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!).
补丁完成后我删除了所有人的访问权限(我打赌你以为我会忘记这样做!)。
Best of luck with manually patching on Windows 8. I really love Android Studio, but its definitely on the clunky side in this regard. 祝你在Windows 8上手动打补丁。我真的很喜欢Android Studio,但在这方面它绝对是笨拙的一面。
Copy the new jar file to app\\libs folder.将新的 jar 文件复制到 app\\libs 文件夹。 Make sure in your build.gradle (app), you import the file under dependencies section:
确保在您的 build.gradle(应用程序)中,您在依赖项部分下导入文件:
dependencies {
...
implementation files ('libs/myfile.jar')
Do a File |做一个文件 | Invalidate caches / restart to refresh the jar file.
使缓存无效/重新启动以刷新 jar 文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.