2011-08-13 56 views
0

我開發從書的「Hello Android」的應用程序。我添加了一個橫向視圖,昨天晚上我測試的時候它工作的很好。我今天早上起牀了,它不再起作用。我得到一個黑色的屏幕,並強行退出。佈局的土地,黑色的屏幕和強制退出

我沒有改變應用罷了。我正在使用Galaxy S2進行測試。

這裏是我的佈局land.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:padding="30dip" 
android:background="@color/background" 
> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
> 
<TextView 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_gravity="center" 
android:layout_marginBottom="25dip" 
android:textSize="24.5sp" 
android:text="@string/main_title" 
/> 
<Button 
android:id="@+id/continue_button" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/continue_label" 
/> 
<Button 
android:id="@+id/new_button" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/new_game_label" 
/> 
<Button 
android:id="@+id/about_button" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/about_label" 
/> 
<Button 
android:id="@+id/exit_button" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/exit_label" 
/> 
</LinearLayout> 
</LinearLayout> 
+0

你可以粘貼logcat的痕跡? – PravinCG

+0

是的,我如何獲得logcat跟蹤?對不起,我是日食新手。 –

+0

http://developer.android.com/guide/developing/debugging/debugging-projects.html – PravinCG

回答

0

如果退出的Eclipse昨夜你提示保存所有未保存的文件?您可能已經保存了您之前做出的未經保存的更改,無論是意外還是設計,現在正在編譯到您的項目中,而之前並沒有這樣做?從Logcat中的錯誤消息開始並返回。