R cannot be resolved - Android, no import android.R; statement

前端 未结 10 1120
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 03:55

Ok, I am working on a new app and everything worked fine as long as I used a Relative View. However, I want a tabbed layout so I switched what I had (not much so far since

10条回答
  •  无人及你
    2020-12-11 04:44

    1. You can try to "clean" your project.
    2. The default tech solution helps sometimes: restart Eclipse (seriously)
    3. If you have an error (something in your XML maybe, or something else), R cannot be compiled. If this is the case, try to find the first error noted. If you fix this, R will be compiled and found. If necesairy, use point 1. and 2. after fixing stuff.
    4. Remove all "import R" stuff in the import sections. You don't want that.

提交回复
热议问题