2015-11-06 66 views
-2

我正在編寫CrimeIntent應用程序Android編程: The Big Nerd Ranch Guide。我有一個渲染問題,當我在LinearLayout文件片段(fragment_crime.xml)把一個小部件EditText。這裏是代碼在LinearLayout中使用EditText小部件時出現渲染錯誤

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:orientation="vertical" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"> 

<EditText android:id="@+id/crime_title" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:hint="@string/crime_title_hint"/> 

</LinearLayout> 

我不想改變的主題。

+0

什麼樣的渲染問題? – fattidare

+1

在xml中沒有錯誤...可能它是android studio中的插件和庫加載問題...嘗試重新啓動它或檢查缺少的庫和目標..或檢查「@ string/crime_title_hint」是否存在在'Strings.xml'資源中。 –

+0

謝謝 你是對的@sourabh我重新啓動了Android工作室,它運作良好 –

回答

1

你的佈局xml沒有錯誤...可能是android studio中的插件和庫加載問題...嘗試重新啓動它或檢查缺少的庫和目標..或檢查@ string/crime_title_hint如果它存在於Strings.xml資源中。

相關問題