【Android】錯誤:The application ... has stopped unexpectedly. Please try again.

錯誤:The application ... has stopped unexpectedly. Please try again.


有太多種錯誤可能會導致此error訊息
此時建議進入DDMS觀察產生的錯誤!

其中可能原因1:因為UI的寬高沒有設定





若非直接使用Graphical Layout編輯UI元件,
而是直接進入.xml做coding
有可能因為腦殘疏忽導致UI的寬高沒有設定...
神奇的是,eclipse竟然不會有錯誤訊息顯示
而是要等到emulator跑起來時才會告訴你發生錯誤@@


想一想也是,其實每個代表View的標籤都必須具有
android:layout_width
android:layout_height
否則要怎麼做顯示的動作呢?

留言

這個網誌中的熱門文章

【Eclipse】MS950轉UTF-8亂碼解決方法 中文亂碼

【PHP】兩個等於==和三個等於===有何差別?

使用 Feedly 訂閱 Ptt 的 RSS,讓手機少裝一些 App