2016-05-09 3 views
3

私は新しいアクティビティを作成し、[完了]をクリックし、それが警告:
イベントログ:
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]アンドロイドstudio2.0エラーInvalidReferenceExceptionときに、新しい空のアクティビティ

答えて

-2

ビルド - >クリーンプロジェクトを実行してください。あなたはUdacityプロジェクトでこの問題に直面している場合はそれが同じような状況

0

にも私の作品は、これは既知のバグです:

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

同様の問題もherehereを報告しました。

提案回避策は次のとおりです。

は、プロジェクトのbuild.gradleから以下の設定を削除してから再度プロジェクト> [インポートプロジェクトを閉じて、今

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

同期をクリックします。

+0

エラー:ファイルH:\ Dropbox \ workspace_AndroidStudio \ _Udacity_2_ToyApp \ Lesson06-Visualizer-Preferences \ T06.01-Exercise-SetupTheActivity \ app \ build \ intermediates \ explodedのエラーが発生しました。 -aar \ com.android.support \ appcompat-v7 \ 25.1.0 \ res \ drawable-hdpi-v4 \ abc_textfield_search_default_mtrl_alpha.9.pngをH:\ Dropbox \ workspace_AndroidStudio \ _Udacity_2_ToyApp \ Lesson06-Visualizer-Preferences \ T06.01-エクササイズ-Activity \ app \ build \ intermediates \ res \ merged \ debug \ drawable-hdpi-v4 \ abc_textfield_search_default_mtrl_alpha.9.png –

関連する問題