I have a problem using AndroidStudio. I freshly installed it on my Kubuntu 18.04 machine and wanted to create my frist project. Everyhting worked fine and the project opened
Had a similar problem after renaming the project folder and adding the renamed folder as new project.
(before I removed the old project link which was not enough)
I solved the problem by rename the project folder and then reopen android studio , android studio will tell you that it can not find the project , then remove the project from the android studio current open list . rename project folder back and open it by android studio again .
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:
rm .idea/modules.xml
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.