android studio 报错Failed to save settings的解决方法
1.先Enable Android Support,可以在file->setting->plugin设置.但新版的可能没有这个设置.
2.尝试删除C:UsersAdministrator下面的.AndroidStudio/config, .AndroidStudio/system and .AndroidStudio/plugins ,一定要先备份.重启试试.
3.按如下设置: File > Invalidate caches/restart > Invalidate and Restart,重启android studio,有警告则点击:Enable Android Support.
4.尝试删除项目目录下的 .idea/workspace.xml ,记得先备份.重启android studio再Enable Android Support.
5.尝试更新: Android Studio ,从菜单操作:Help>CheckForUpdates>Update.
- 尝试增加如下参数大小: -Xmx and -XX:MaxPermSize values in the studio.vmoptions file.
7.如果你使用的是Linux系统,比如Ubantu20.0.4,可能是磁盘空间不够了,删除掉一些不需要的文件,释放空间,或者清空回收站,重启android studio即可。本人亲试有效。
8.尝试如下步骤:
- Close Android Studio
- Remove .idea/workspace.xml
- Restart android studio (your project with the issue is opened automatically)
- A new .idea/workspace.xml is created
- Sync project with gradle files
- Open File -> Settings – > Plugins -> Enable
- “Android Support” Plugin.
1) Android NDK support (I had to disable and re-enable it)
2) Restart Android Studio
9.尝试替换 build.gradle 文件,如下:
buildscript {
...
repositories {
mavenLocal()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url "https://jitpack.io" }
mavenCentral() // jcenter() works as well because it pulls from Maven Central
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
...
}
allprojects {
repositories {
mavenLocal()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url "https://jitpack.io" }
mavenCentral() // jcenter() works as well because it pulls from Maven Central
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。