I came across this very strange error message in Android Studio. It is displayed on top of my own code built using ndk-buildGradle. Breakpoints and step code work fine, but the code is completely littered with "errors" such as "Unable to resolve a variable."
Here is an example of what it looks like:

Again, the code is working correctly, just like the IDE, it seems it is not able to resolve a whole bunch of types. On the right side you see an illustration of errors. Basically, each line is flagged as an error, although all of it compiles just fine. I don’t know what is going on!
source
share