Errors flagged in source with 2016.1, but build and run works


I have a project that worked fine with Idea 15, but with 2016.1 I am getting spurious error flags in one source file. Screenshot below, and if I hover over the error it says "cannot access com.controlj.utility.CJLog". This class is in a JAR file that is a included in the build.gradle for a module called Utilities, which my app module depends on. If I include the same JAR file in the app build.gradle the error goes away but then I get the problem with multiple definitions when DEXing. Even though these errors are flagged, the module builds and runs just fine, both from Idea and the command line using gradlew.


Another screenshot showing the error message:


Please try the patch from

Also try File | Invalidate Caches | Invalidate and Restart and refresh the Gradle project.

If it doesn't help, please file a bug at and attach a sample project to reproduce this problem.


Invalidating caches was no help.

Installing the new jars gives this:

Plugin Error
Problems found loading plugins:
Plugin "Android Support" was not loaded: required plugin "Gradle" not installed.
Plugin "RoboVM Intellij IDEA Plugin" was not loaded: required plugin "Gradle" not installed.

I'll create a sample project if I have time, but will go back to 15 for now.


It looks like an android specific issue. And hence the patch from IDEA-150685 will not help. The project import differs very much in android-gradle projects, e.g. there is no custom source sets support and many things works differently compared to regular gradle projects.

That's why it would be great if you could share the sample to reproduce the issue.


Revisiting this problem, which still exists in 2016.2. I have created a sample project that demonstrates the problem. The module Test2/app builds correctly, but the IDE shows errors.

The sample project is zipped here:


Please sign in to leave a comment.