[Android] andorid.content.res.Resources NotFoundException

  • 0
有的時候會收到

andorid.content.res.Resources NotFoundException: Resource ID #0x0
或者是
ImageView cannot cast to TextView

這種 error msg,明明什麼都沒動卻突然跑出來。以前碰到都會覺得超可怕,現在通常用兩招
1. 大絕招: IntelliJ 上 Invalidate Cache / Restart (也就是 eclipse 中的 clear)
2. Refactor -> Rename 出問題的那個 element。聽說好像也是類似 R 檔對應錯的問題

沒有留言 :

張貼留言