Android Studio:无法初始化编辑器 [英] Android Studio: Failed to initialize editor

查看:202
本文介绍了Android Studio:无法初始化编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Android Studio技术的新手.我刚刚在Windows 10计算机上从头启动了一个新的空项目.首先,在我的activity_main.xml文件中,我可以看到错误编辑器在下一个gradle同步之前不可用".点击与Gradle文件同步项目"后,错误消息变成初始化编辑器失败".如下图所示:

I'm new with Android Studio technology. I've just launched a new empty project from scratch on Windows 10 machine. At first in my activity_main.xml file I could see an error "editor is unavaible until next gradle synch". After clicking on "Synch Project with Gradle Files" the error message turns into "Failed to initialize editor" as you can see on the pic below:

如您所见,构建控制台未显示任何错误.顶部栏上的绿色箭头也被静音.我该如何解决这个问题?

As you can see build console shows no errors. Also green arrow on the top bar is muted. How can I fix this issue?

Android Studio版本:4.02JDK版本:1.8.0_261

Android Studio version: 4.02 JDK version: 1.8.0_261

注意:我已经在计算机上安装了Avast Antivirus.我不确定它是否会改变任何东西,但是在几个类似的主题中,人们将此程序报告为干扰Android Studio的问题.但是我的隔离隔离仍然是空的.

Note I've got Avast Antivirus installed on my computer. I'm not sure if it changes anything but in few similar topics people repored this program as an issue interfering with Android Studio. However my avast quarantine remains empty.

更新/解决方案就我而言,事实证明,将Android Studio从4.0.2降级到3.5.3版本可以解决此问题.现在一切正常.

Update/Solution In my case it turned out that downgrading my Android Studio from 4.0.2 to 3.5.3 version solved this problem. Now everything works fine.

推荐答案

我不确定导致此错误的原因,但是您可以通过先关闭项目并删除.idea \中的project.xml文件来解决此问题.项目的codeStyles \目录,重新打开项目后,将弹出一个提示您重新配置此文件的弹出窗口,之后一切正常,

I don't know for sure what causes this error but you can solve it by first closing the project and deleting the project.xml file in the .idea\codeStyles\ directory of your project, as soon as you reopen your project you will get a popup prompting you to reconfigure this file, after that everything should be okay,

这篇关于Android Studio:无法初始化编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆