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

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

    Check that all of the strings you think you're using (e.g. "@string/Hello_world") actually exist in your strings.xml file. I got the OP's error after declaring a menu item using android:title="@string/Navigation", but I hadn't added Navigation to strings.xml

提交回复
热议问题