简体   繁体   English

如何修复意外关闭导致的 android studio gradle 错误

[英]How to fix android studio gradle errors from unexpected shutdown

I am developing android applications in android studio 2.1.我正在 android studio 2.1 中开发 android 应用程序。 My system was shut down unexpectedly due to the power failure.Then after power comes i restarted my system open the android studio all my API components are showing error but my gradle file showing that it was successfully build what was the problem here i am getting don't know This screen shot will explain you more由于电源故障,我的系统意外关闭。然后电源来了后,我重新启动我的系统,打开 android studio,我所有的 API 组件都显示错误,但我的 gradle 文件显示它已成功构建这里的问题是什么我得到了不知道这个屏幕截图会向你解释更多在此处输入图片说明

It was showing gradle successfully build but still error remains same can anyone help me它显示 gradle 已成功构建,但错误仍然相同,任何人都可以帮助我

Try to clean the project using the gradle task clean then invalidate the cache of android studio and restart (File/invalidate cache and restart).尝试使用 gradle 任务 clean 清理项目,然后使 android studio 的缓存无效并重新启动(文件/使缓存无效并重新启动)。 after that synchronise your project with grade and build it again.之后,将您的项目与成绩同步并重新构建。 I think it would solve your issue.我想它会解决你的问题。

Let me know if it works.让我知道它是否有效。

First, Close your IDE and Follow these two simple steps to solve this problem.首先,关闭你的 IDE 并按照这两个简单的步骤来解决这个问题。

Delete caches folder of the path删除路径的缓存文件夹

C:\\Users\\user\\.AndroidStudio4.0\\system\\caches.

Delete specific project's caches folder too也删除特定项目的缓存文件夹

E:\\AndroidProjects\\SampleApp\\.idea\\caches

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

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