Error while creating new Activity

后端 未结 2 1531
野的像风
野的像风 2021-01-13 06:34

I am trying to create a new Activity, but the following error comes up (bottom of image)

InvalidReferenceException: Error executing FreeMarker templa

2条回答
  •  离开以前
    2021-01-13 07:22

    From the following link : Cannot create empty activity, in Android Studio 2.2.3 , some people had the same kind of problem :

    ERROR - llij.ide.plugins.PluginManager - com.android.tools.idea.templates.FreemarkerUtils$TemplateProcessingException: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> manifestDir [in template "root://activities/common/common_globals.xml.ftl" at line 26, column 39]

    The problem was related to a tmp folder created on the C drive

    When I first installed Android SDK, I installed it to the C drive and did some exercises inside ud851-Exercises-student there. Then, because I ran out of space on the C drive, I uninstalled it from C and installed it to D. Maybe I accidentally opened one of those projects and that cause the Android Studio to create the tmp folder in C.

    Deleting the C:\tmp folder solved the problem

    I was having the same issue...deleting tmp folder helped.

    Some more information about the root cause :

    I realized this issue is because of the "buildDir" path in build.gradle file in Udacity projects. See screen shot.

提交回复
热议问题