詳情:Android Studio中的錯誤,而試圖添加一個片段來推算誤差
Android Studio 2.1.1
5:09:32 PM InvalidReferenceException: Error executing FreeMarker template: The following has evaluated to null or missing:
==> srcDir [in template "root://other/BlankFragment/globals.xml.ftl" at line 7, column 34]
Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use when-presentwhen-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??
The failing instruction:
==> ${srcDir} [in template "root://other/BlankFragment/globals.xml.ftl" at line 7, column 32] (show balloon)
***When Show balloon is clicked***
InvalidReferenceException
Error executing FreeMarker template: The following has evaluated to null or missing: ==> srcDir [in template "root://other/BlankFragment/globals.xml.ftl" at line 7, column 34] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use #if myOptionalVar??>when-present#else>when-missing#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction: ==> ${srcDir} [in template "root://other/BlankFragment/globals.xml.ftl" at line 7, column 32]
您需要提供有關導致錯誤的更多信息。看看這個答案 - 類似的問題http://stackoverflow.com/questions/35805983/freemarker-template-error-the-following-has-evaluated-to-null-or-missing-but – Zain
謝謝,一對夫婦「無效緩存/重啓」例程 - 此錯誤消失。 –