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

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

    I have a few suggestions:

    1. Make sure you don't have any other errors other than the R-related errors. Right-click your project folder in Eclipse, Android Tools -> Fix Project Properties.

    2. Check to make sure you have the correct R imported. Sometimes the default Android.R can be imported.

    3. Check for errors in your layout XML files.

提交回复
热议问题