To complete the question: I believe either this is due to patch update to Gradle or project Gradle settings, but I am clueless.
gradleVersion = '4.2.2'
compileSdkVersion = 31
minSdkVersion = 21
targetSdkVersion = 31
buildToolsVersion = '31.0.0'
com.android.tools.build:gradle:4.2.2
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
I use Android Studio for development.
Version:
After frequent system crashes on Windows 10, due to corrupt memory modules, some of the features crashed. I searched in Google and Android Studio documents for troubleshooting, but it seems that my search keywords were not strong, to get me a relevant solution to roll back Android Studio to a stable state.
I simply left the project and cloned it in another directory. With .git restored I saw the files in their original form.
I re-installed the Android Studio, but due to the previous installation, there was no change. I want to restore the LINT to the previous state. I have the image to show what is happening.
Some keys and flow of control of Kotlin are not recognized showing unnecessary errors. It is difficult to know whether I am writing the correct spelling (one example for the difficulties I am facing) or not until I build my project.
When my .git files crashed, the code was intact, but show garbled texts in the Android Studio Editor for the same file.
Some Kotlin flow of controls are not recognized by Lint
Update:
Intelliscence and Lint are not working in Kotlin Android:-
Kotlin is unable to find OkHttp's extension method: toMediaOrNull().
I found this link :- Uninstall Android Studio with complete effect
Note: Some sections here will be moved to the question section above, and also some sections from the above question section are worthy to be moved here in the answer.
Once verified whether this is working successfully, I will update a detailed answer.
Update:
The Analysis process (top end of the editor screen), never stops.
There is not a single change after I deleted the .gradle and .idea folders in the root folder.
Some of the IntelliSense came back after invalidating the cache and restarting Android Studio.
Following: Rename folders inside your {{user_dir}}/.android folder.
Step by step, we are coming to a close and only this is left: Some of the newly added variables in the binding (layout) are not recognized while the older widget ids are still recognized (in the camel case (Kotlin), from snake case (layout XML)).
New Ids in layout --> binding, are not recognized:
Old Ids in layout --> binding, are still recognized:
Let me observe this for some time, to see whether it comes to normal and come up with more updates. As usual, I face no issues while building and running the APK on my Android device.