android studio异常关机后出现的问题

使用android studio 时突然卡死。

重启后所有项目都打不开,提示workspace.xml  Error:content is not allowed in prolog

打开workspace.xml文件后发现时空的。

最后删除workspace.xml再重新导入即可

导入后无法编辑和运行:

显示错误

10:34:41 RuntimeException: update failed for AnAction with ID=EditSource: java.lang.ClassNotFoundException: com.android.tools.idea.roots.ui.configuration.GradleProjectSettingsService

10:43:08 RuntimeException: update failed for AnAction with ID=EditSource: java.lang.ClassNotFoundException: com.android.tools.idea.roots.ui.configuration.GradleProjectSettingsService

解决方法,在菜单中的Run下面,选择Debug,然后会提示创建配置。按照提示新建配置即可

如果碰见下面的异常:

Target package is not specified in AndroidManifest.xml

则删除调试配置,新建新的调试配置即可

(记得要把before launch make里面的Make去掉)

clipboard

原文地址:https://www.cnblogs.com/lsjwzh/p/3197779.html