简体   繁体   English

Android xml和gradle代码突然更改,并显示自动生成的代码

[英]Android xml and gradle code changed suddenly and shows Auto generated code

Suddenly my code in xml changed to some auto-generated code and shows another project's name 突然,我在xml中的代码更改为一些自动生成的代码,并显示了另一个项目的名称

在此处输入图片说明

This above code is my original xml code. 上面的代码是我原来的xml代码。 And it has turned into below auto-generated code. 并且它变成了下面的自动生成的代码。

在此处输入图片说明

It'll be very helpful if someone can provide any kind of help to resolve this problem. 如果有人可以提供任何帮助来解决此问题,这将非常有帮助。

This issue has occurred when I migrate to android studio 3.2.1 当我迁移到android studio 3.2.1时发生此问题

For me, it works after deleting android cache folder. 对我来说,删除android缓存文件夹后就可以使用。 You can delete this folder from this location. 您可以从该位置删除该文件夹。

C:\\Users\\user_name\\.gradle\\caches C:\\ Users \\用户名\\ .gradle \\缓存

Note: Close the android studio before you delete this folder. 注意:删除此文件夹之前,请关闭android studio。

UPDATE: Solved my problem by copy paste previous codes into these files. 更新:通过复制粘贴以前的代码到这些文件中解决了我的问题。 Took hours do that. 花了几个小时。 But didn't find any other solution. 但是没有找到其他解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM