Issue
Creating new Android Studio project get the following exception in Gradle build file:
Cannot resolve symbol 'GradleException'
Gradle still builds successfully, but still shows this error in editor.
What's missing from my project?
Android Studio 3.3.2
Gradle 4.10.1
compileSdkVersion 27
Solution
Note: this answer is no longer up-to-date for newer versions of Android Studio and Gradle. See this answer instead.
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.
So invalidating the caches and restarting may issues like this, whether it's with Gradle or with Java/Kotlin/Scala/<insert language here>.
Answered By - Zoe stands with Ukraine
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.