Android Studio 3.2.1 - Cannot sync project with gradle files: Argument for @NotNull parameter 'message' of ... must not be null

Ok, I was finally able to figure out the reason.

The problem was, that my project folder resided on a different hard disk partition, than my home folder. The folder containing my android projects was linked to my home folder with a symbolic link.

I can't tell whether its the symbolic link, or the other partition, that is causing the problem. I haven't checked that. Maybe it works if you have it on the same partition but linked with a symbolic link. Maybe it works when used on another partition without symbolic links. But for anyone experiencing this problem -> Check if one of these might be your cause as well.

Some extra information: My android project folder resided on a hard disk partition formatted with ZFS.


I saw a version of this with just now on Android Studio 3.4: the only error message I saw in the IDE was that Gradle sync failed, but in idea.log there was a NullPointerException and its traceback originated at com.intellij.openapi.extensions.Extensions.disposeArea and was just like the one in the question.

The fix that worked for me:

  1. rm .idea/modules.xml

  2. Then try Gradle sync again.

This also caused that file to get automatically regenerated. The new version had exactly the same entries as the old, plus some additional ones for various library dependencies. Not sure if those entries being absent was the cause of the issue, or an unrelated accident.

Before that, I tried "Invalidate Caches / Restart...", and it didn't work in my case. Also double-checked and there are no symbolic links in my project path, or the paths to Android Studio or the Android SDK.


Had a similar problem after renaming the project folder and adding the renamed folder as new project.

  • solved this by the infamous "Invalidate Caches / Restart" option

(before I removed the old project link which was not enough)