Android Studio无法解析符号"GradleException" [英] android studio cannot resolve symbol 'GradleException'

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

问题描述

创建新的Android Studio项目在Gradle构建文件中出现以下异常:

Creating new Android Studio project get the following exception in Gradle build file:

Cannot resolve symbol 'GradleException'

Gradle仍然可以成功构建,但是在编辑器中仍然显示此错误.

Gradle still builds successfully, but still shows this error in editor.

我的项目中缺少什么?

Android Studio 3.3.2

Android Studio 3.3.2

4.10.1级

compileSdkVersion 27

compileSdkVersion 27

推荐答案

Android Studio似乎存在各种我无法理解为什么存在的问题,但已通过使缓存无效并重新启动(从文件菜单项)来解决了这些问题.因为代码可以很好地编译,所以这似乎是其中一种情况,其中高速缓存条目最终以某种方式结束了,我不确定具体会发生什么,但实际上是阻止其正常工作的某种情况.

Android Studio seems to have various problems that I cannot understand why exist, but they're fixed by invalidating the caches and restarting (from the file menu item). Because the code compiles fine, it seems that this is one of those cases, in which a cache entry somehow ends up, I'm not really sure what specifically happens, but essentially something that prevents it from working properly.

因此,不管是使用Gradle还是使用Java/Kotlin/Scala/<在此处插入语言>,使缓存无效并重新启动都可能会出现这样的问题.

So invalidating the caches and restarting may issues like this, whether it's with Gradle or with Java/Kotlin/Scala/<insert language here>.

这篇关于Android Studio无法解析符号"GradleException"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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