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

前端 未结 10 1128
没有蜡笔的小新
没有蜡笔的小新 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:55

    You need to make sure you import R. If your main package is com.example try importing "com.example.R" at the top of your files. For some reason eclipse does not do this for you.

提交回复
热议问题