转载于Android Studio安装Plugins插件 重启后插件却保存不上 - 简书
<div class="post">
<div class="article">
<h1 class="title">Android Studio安装Plugins插件 重启后插件却保存不上</h1>
<!-- 作者区域 -->
<div class="author">
<a class="avatar" href="/u/e0d050a2120f">
<img src="//upload.jianshu.io/users/upload_avatars/4655344/6bfcd32d-4d31-4c1a-acab-ac009cf7a35d.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96" alt="96">
</a> <div class="info">
<span class="name"><a href="/u/e0d050a2120f">小小程序员jh</a></span>
<!-- 关注用户按钮 -->
<a class="btn btn-success follow"><i class="iconfont ic-follow"></i><span>关注</span></a>
<!-- 文章数据信息 -->
<div class="meta">
<!-- 简书钻 -->
<!-- 如果文章更新时间大于发布时间,那么使用 tooltip 显示更新时间 -->
<span class="publish-time">2018.04.30 18:52</span>
<span class="wordage">字数 419</span>
<span class="views-count">阅读 492</span><span class="comments-count">评论 2</span><span class="likes-count">喜欢 1</span></div>
</div>
<!-- 如果是当前作者,加入编辑按钮 -->
</div>
<!-- 文章内容 -->
<div data-note-content="" class="show-content">
<div class="show-content-free">
<p><a href="https://link.jianshu.com?t=https%3A%2F%2Fwww.2cto.com%2Fkf%2Fyidong%2FAndroid%2F" target="_blank" rel="nofollow">Android</a> Studio安装Plugins插件 重启后插件却保存不上,首先,如果你没有更改AS默认的缓存地址(AS默认缓存地址:C:\Users\Administrator),这个地址下面有“.android”,".AndroidStudioX.XX",".gradle"三个AS的缓存文件。</p>
<p>(那么你可以忽略该文章的内容。。。)</p>
<p>假如你更改了AS的默认缓存文件存放地址!</p>
<p>第一步:请打开你的AS安装目录下的bin文件夹。</p>
<div class="image-package">
<div class="image-container" style="max-width: 700px; max-height: 600px; background-color: transparent;">
<div class="image-container-fill" style="padding-bottom: 84.39%;"></div>
<div class="image-view" data-width="711" data-height="600"><img data-original-src="//upload-images.jianshu.io/upload_images/4655344-56f6b50f5a55ecd6.png" data-original-width="711" data-original-height="600" data-original-format="image/png" data-original-filesize="104483" style="cursor: zoom-in;" class="" src="//upload-images.jianshu.io/upload_images/4655344-56f6b50f5a55ecd6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/711/format/webp"></div>
</div>
<div class="image-caption">20170918103738100.png</div>
</div>
<p>第二步:右键“idea.properties”文件,找到这一行注释#idea.plugins.path=${idea.config.path}/plugins</p>
<p>并在下面这样写“idea.plugins.path=${idea.system.path}/plugins”</p>
<div class="image-package">
<div class="image-container" style="max-width: 700px; max-height: 567px; background-color: transparent;">
<div class="image-container-fill" style="padding-bottom: 81.07%;"></div>
<div class="image-view" data-width="898" data-height="728"><img data-original-src="//upload-images.jianshu.io/upload_images/4655344-eab7582ffd67a86f.png" data-original-width="898" data-original-height="728" data-original-format="image/png" data-original-filesize="106653" style="cursor: zoom-in;" class="" src="//upload-images.jianshu.io/upload_images/4655344-eab7582ffd67a86f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/898/format/webp"></div>
</div>
<div class="image-caption">20170918103739101.png</div>
</div>
<div class="image-package">
<div class="image-container" style="max-width: 700px; max-height: 567px; background-color: transparent;">
<div class="image-container-fill" style="padding-bottom: 81.07%;"></div>
<div class="image-view" data-width="898" data-height="728"><img data-original-src="//upload-images.jianshu.io/upload_images/4655344-e278e7e8861cdbdc.png" data-original-width="898" data-original-height="728" data-original-format="image/png" data-original-filesize="124195" style="cursor: zoom-in;" class="" src="//upload-images.jianshu.io/upload_images/4655344-e278e7e8861cdbdc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/898/format/webp"></div>
</div>
<div class="image-caption">20170918103739102.png</div>
</div>
<p>第三步:修改完毕后,保存退出,并重启AS。此时你会发现消失的插件jar包又正常了。</p>
<p>那么折腾了半天终于搞好了,原因是什么呢?</p>
<p>答案是这样的:因为没有更改默认缓存地址的话,那么这个时候plugins读取的文件目录指向的是.AndroidStudio\config</p>
<p>而修改了默认缓存地址的话,AS的plugins读取的文件目录会随着你根目录的改变而改变,</p>
<p>这个时候就会惊奇的发现-----下载的插件是存放在.AndroidStudio\system\plugins目录,</p>
<p>而AS读取的却是.AndroidStudio\config,所以Android Studio安装Plugins插件 重启后插件却保存不上的问题就出现了!</p>
<p>而我们只需要小小的改动一下:</p>
<p>idea.plugins.path=${idea.config.path}/plugins(默认)</p>
<p>idea.plugins.path=${idea.system.path}/plugins就行了(最终修改后)</p>
</div>
</div>
</div>
<!-- 如果是付费文章,未购买,则显示购买按钮 -->
<!-- 连载目录项 -->
<!-- 如果是付费文章 -->
<!-- 如果是付费连载,已购买,且作者允许赞赏,则显示付费信息和赞赏 -->
<div id="free-reward-panel" class="support-author"><p>如果你觉得我的文章对你有用,请酌情打赏!</p> <div class="btn btn-pay">赞赏支持</div> <div class="supporter"><ul class="support-list"></ul> <!----></div> <!----> <!----></div>
<div class="show-foot">
<a class="notebook" href="/nb/9659858">
<i class="iconfont ic-search-notebook"></i>
<span>日记本</span>
</a> <div class="copyright" data-toggle="tooltip" data-html="true" data-original-title="转载请联系作者获得授权,并标注“简书作者”。">
© 著作权归作者所有
</div>
<div class="modal-wrap" data-report-note="">
<a id="report-modal">举报文章</a>
</div>
</div>
<!-- 文章底部作者信息 -->
<div class="follow-detail">
<div class="info">
<a class="avatar" href="/u/e0d050a2120f">
<img src="//upload.jianshu.io/users/upload_avatars/4655344/6bfcd32d-4d31-4c1a-acab-ac009cf7a35d.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/96/h/96" alt="96">
</a> <a class="btn btn-success follow"><i class="iconfont ic-follow"></i><span>关注</span></a>
<a class="title" href="/u/e0d050a2120f">小小程序员jh</a>
<i class="iconfont ic-man"></i>
<p>写了 52650 字,被 77 人关注,获得了 130 个喜欢</p></div>
<div class="signature">不断学习。
github: https://github.com/jinhuizxc</div>
</div>
<div class="meta-bottom">
<div data-v-6ddd02c6="" class="like"><div data-v-6ddd02c6="" class="btn like-group"><div data-v-6ddd02c6="" class="btn-like"><a data-v-6ddd02c6="">喜欢</a></div> <div data-v-6ddd02c6="" class="modal-wrap"><a data-v-6ddd02c6="">1</a></div></div> <!----></div>
<div class="share-group">
<a class="share-circle" data-action="weixin-share" data-toggle="tooltip" data-original-title="分享到微信">
<i class="iconfont ic-wechat"></i>
</a>
<a class="share-circle" data-action="weibo-share" data-toggle="tooltip" href="javascript:void((function(s,d,e,r,l,p,t,z,c){var%20f='http://v.t.sina.com.cn/share/share.php?appkey=1881139527',u=z||d.location,p=['&url=',e(u),'&title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function%20a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,'','','', '推荐 小小程序员jh 的文章《Android Studio安装Plugins插件 重启后插件却保存不上》( 分享自 @简书 )','https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=weibo','页面编码gb2312|utf-8默认gb2312'));" data-original-title="分享到微博">
<i class="iconfont ic-weibo"></i>
</a>
<a class="share-circle" data-toggle="tooltip" id="longshare" target="_blank" data-original-title="" title="">
<div class="qrcode" id="qrcode">
<img src="//cdn2.jianshu.io/assets/web/download-index-side-qrcode-cb13fc9106a478795f8d10f9f632fccf.png" alt="Download index side qrcode">
<p>下载app生成长微博图片</p>
</div>
<i class="iconfont ic-picture"></i>
</a>
<a class="share-circle more-share" tabindex="0" data-toggle="popover" data-placement="top" data-html="true" data-trigger="focus" href="javascript:void(0);" data-content="
<ul class="share-list">
<li><a href="javascript:void(function(){var d=document,e=encodeURIComponent,r='http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+e('https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=qzone')+'&title='+e('推荐 小小程序员jh 的文章《Android Studio安装Plugins插件 重启后插件却保存不上》'),x=function(){if(!window.open(r,'qzone','toolbar=0,resizable=1,scrollbars=yes,status=1,width=600,height=600'))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();"><i class="social-icon-sprite social-icon-zone"></i><span>分享到QQ空间</span></a></li>
<li><a href="javascript:void(function(){var d=document,e=encodeURIComponent,r='https://twitter.com/share?url='+e('https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=twitter')+'&text='+e('推荐 小小程序员jh 的文章《Android Studio安装Plugins插件 重启后插件却保存不上》( 分享自 @jianshucom )')+'&related='+e('jianshucom'),x=function(){if(!window.open(r,'twitter','toolbar=0,resizable=1,scrollbars=yes,status=1,width=600,height=600'))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();"><i class="social-icon-sprite social-icon-twitter"></i><span>分享到Twitter</span></a></li>
<li><a href="javascript:void(function(){var d=document,e=encodeURIComponent,r='https://www.facebook.com/dialog/share?app_id=483126645039390&display=popup&href=https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=facebook',x=function(){if(!window.open(r,'facebook','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();"><i class="social-icon-sprite social-icon-facebook"></i><span>分享到Facebook</span></a></li>
<li><a href="javascript:void(function(){var d=document,e=encodeURIComponent,r='https://plus.google.com/share?url='+e('https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=google_plus'),x=function(){if(!window.open(r,'google_plus','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})();"><i class="social-icon-sprite social-icon-google"></i><span>分享到Google+</span></a></li>
<li><a href="javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e('https://www.jianshu.com/p/fad670cf0489?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=douban')+'&title='+e('Android Studio安装Plugins插件 重启后插件却保存不上')+'&sel='+e(s)+'&v=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()"><i class="social-icon-sprite social-icon-douban"></i><span>分享到豆瓣</span></a></li>
</ul>
" data-original-title="" title="">更多分享</a>
</div>
</div>
<a id="web-note-ad-1" target="_blank" href="/apps/redirect?utm_source=note-bottom-click"><img src="//cdn2.jianshu.io/assets/web/web-note-ad-1-c2e1746859dbf03abe49248893c9bea4.png" alt="Web note ad 1"></a>
<!--
<div id="note-comment-above-ad-container">
<span id="youdao-comment-ad" class="ad-badge">广告</span>
</div>
-->
<div><div id="comment-list" class="comment-list"><div><form class="new-comment"><a class="avatar"><img src="//cdn2.jianshu.io/assets/default_avatar/avatar_default-78d4d1f68984cd6d4379508dd94b4210.png"></a> <div class="sign-container"><a href="/sign_in?utm_source=desktop&utm_medium=not-signed-in-comment-form" class="btn btn-sign">登录</a> <span>后发表评论</span></div></form> <!----></div> <!----> <div class="comments-placeholder" style="display: none;"><div class="author"><div class="avatar"></div> <div class="info"><div class="name"></div> <div class="meta"></div></div></div> <div class="text"></div> <div class="text animation-delay"></div> <div class="tool-group"><i class="iconfont ic-zan-active"></i><div class="zan"></div> <i class="iconfont ic-list-comments"></i><div class="zan"></div></div></div> <div id="normal-comment-list" class="normal-comment-list"><div><div><div class="top-title"><span>2条评论</span> <a class="author-only">只看作者</a> <a class="close-btn" style="display: none;">关闭评论</a> <div class="pull-right"><a class="active">按时间倒序</a><a class="">按时间正序</a></div></div></div> <!----> <!----> <div class="comments-placeholder" style="display: none;"><div class="author"><div class="avatar"></div> <div class="info"><div class="name"></div> <div class="meta"></div></div></div> <div class="text"></div> <div class="text animation-delay"></div> <div class="tool-group"><i class="iconfont ic-zan-active"></i><div class="zan"></div> <i class="iconfont ic-list-comments"></i><div class="zan"></div></div></div> <div id="comment-32125050" class="comment"><div><div class="author"><div data-v-f3bf5228="" class="v-tooltip-container" style="z-index: 0;"><div class="v-tooltip-content"><a href="/u/e290aa610254" target="_blank" class="avatar"><img src="//upload.jianshu.io/users/upload_avatars/2388310/40f13a4895fe?imageMogr2/auto-orient/strip|imageView2/1/w/114/h/114/format/webp"></a> </div> <!----></div> <div class="info"><a href="/u/e290aa610254" target="_blank" class="name">cdc9527</a> <!----> <!----> <div class="meta"><span>2楼 · 2018.12.12 14:00</span></div></div></div> <div class="comment-wrap"><p>为什么我改了之后 还是不行呢</p> <!----> <div class="tool-group"><a data-v-cdecbe24="" id="like-button-32125050" class="like-button"><span data-v-cdecbe24="">赞</span></a> <a class=""><i class="iconfont ic-comment"></i> <span>回复</span></a> <!----> <!----></div></div></div> <div class="sub-comment-list"><div id="comment-32240564" class="sub-comment"><p><div data-v-f3bf5228="" class="v-tooltip-container" style="z-index: 0;"><div class="v-tooltip-content"><a href="/u/e0d050a2120f" target="_blank">小小程序员jh</a>:
</div> <!----></div> <span>上面的操作自己亲自验证过没有问题,你也可以百度查查看</span> <!----></p> <div class="sub-tool-group"><span>2018.12.14 17:19</span> <a class=""><i class="iconfont ic-comment"></i> <span>回复</span></a> <!----> <!----></div></div> <div class="sub-comment more-comment"><a class="add-comment-btn"><i class="iconfont ic-subcomment"></i> <span>添加新评论</span></a> <!----> <!----> <!----></div> <!----></div></div></div></div> <!----> <div><!----></div></div></div>
</div>