android studio 项目在重启后损坏 [英] android studio projects getting corrupted after a restart

查看:31
本文介绍了android studio 项目在重启后损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到北极狐后,我遇到了这个问题.打开一个我以前使用旧版本 android studio 工作的项目很好,但是在重新启动后,它的文件变得充满了乱码值.我以为是硬件故障问题.但是今天在其他项目中再次发生这种情况,所以我想要一个解决方案.

After upgrading to arctic fox, I faced this issue. Opened a project I worked previously with older version of android studio was fine, but after restart its files became full with gibberish values. I thought its a hardware failure issue. But this happening again today with other projects, so I want a solution.

工作后,关闭并重新打开项目,文件内容已损坏/更改:

After working, closing and reopening the project the files contents became corrupted/changed:

文件内容在之前的项目中发生了变化,显示出与 git 的不同:

File contents changed on previous project, showing difference with git:

ArcticFoxPatch2,项目使用 gradle 7.0.2 构建.

ArcticFoxPatch2, Projects are built with gradle 7.0.2.

尝试过的解决方案:

  1. 我尝试了使缓存无效并重新启动的潜在解决方案,但文件保持不变.

  1. I have tried potential solution of invalidating cache and restart, but the files stays same.

Android studio 发出警告并建议错误的编码,但使用多种其他编码重新加载无法解析文件内容.

Android studio warns and suggest wrong encoding but reloading with multiple other encoding did not resolve file contents.

应该怎么解决?我应该更换硬件,例如 ssd 吗?还是降级android studio?

What should be a solution? Should I change hardware, eg ssd? or downgrade android studio?

推荐答案

请像这样运行 android studio.单击 Android Studio 并单击鼠标右键,然后单击以管理员身份运行".

Please run android studio like this. Click Android Studio and click right button on mouse, then click "Run as Administrator".

希望对你有帮助.

这篇关于android studio 项目在重启后损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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