Error while creating a new activity
From the following link: Unable to create empty activity in Android Studio 2.2.3 , some people had the same problem:
ERROR - llij.ide.plugins.PluginManager - com.android.tools.idea.templates.FreemarkerUtils $ TemplateProcessingException: freemarker.core.InvalidReferenceException: The following evaluates to null or not: ==> manifestDir [in template "root: // activities / common / common_globals.xml.ftl "at line 26, column 39]
The problem is with the tmp folder created on drive C
When I first installed the Android SDK, I installed it on the C drive and did some exercises inside ud851-Exercises-student. Then, because I ended up with a space on drive C, I removed it from C and set it to D. Maybe I accidentally opened one of these projects and this makes Android Studio create a tmp folder in C.
Deleting the C: \ tmp folder solved the problem
I had the same problem ... Did deleting the tmp folder help.
Additional information on the root cause:
I figured out that this issue occurs because of the "buildDir" path in build.gradle in Udacity projects. See Screenshot.
source to share