2016-05-09 8 views
3

, wenn ich eine neue Aktivität erstellen und klicken Sie auf Fertig, es Alarm:
Ereignisprotokoll:
Error executing FreeMarker template: The following has evaluated to null or missing:
==> srcDir [in template "root://activities/common/common_globals.xml.ftl"
at line 41, 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 (print stack trace for 1 more):
==> ${srcDir} [in template "root://activities/common/common_globals.xml.ftl" at line 41, column 32]android studio2.0 Fehler InvalidReferenceException, wenn neue eine leere Aktivität

Antwort

-2

Versuchen Sie Build-> Clean-Projekt. Das ist für mich gut funktioniert in der gleichen Situation

0

Wenn Sie dieses Problem konfrontiert ist in einem Udacity Projekt ist dies ein Know Fehler:

https://github.com/udacity/ud851-Exercises/issues/67

ähnliche Ausgabe berichtete auch here und here.

Vorgeschlagene Abhilfe ist:

die folgende Konfiguration aus dem Projekt build.gradle entfernen und dann auf Sync klicken jetzt

String osName = System.getProperty("os.name").toLowerCase(); 
if (osName.contains("windows")) { 
    buildDir = "C:/tmp/${rootProject.name}/${project.name}" 
} 

Dann schließen Sie das Projekt> Importieren Sie das Projekt erneut.

+0

Wenn ich das tue, bekomme ich diesen anderen Fehler: Fehler: Fehler beim Erstellen der Datei H: \ Dropbox \ workspace_AndroidStudio \ _Udacity_2_ToyApp \ Lektion06-Visualizer-Einstellungen \ T06.01-Übung-SetupTheActivity \ app \ build \ intermediates \ explodiert -aar \ com.android.support \ appcompat-v7 \ 25.1.0 \ res \ Zeichnungs-hdpi-v4 \ abc_textfield_search_default_mtrl_alpha.9.png in H: \ Dropbox \ workspace_AndroidStudio \ _Udacity_2_ToyApp \ Lesson06-Visualizer-Preferences \ T06.01- Übung-SetupTheActivity \ app \ build \ intermediates \ res \ fusioniert \ debug \ drawable-hdpi-v4 \ abc_textfield_search_default_mtrl_alpha.9.png –

Verwandte Themen