Android Hello, Gallery tutorial — “R.styleable cannot be resolved”

前端 未结 7 1923
一整个雨季
一整个雨季 2020-11-27 13:23

When working on the Hello, Gallery tutorial/sample app, after following the instructions on the site, Eclipse reported that R.styleable cannot be resolved.

What is t

7条回答
  •  生来不讨喜
    2020-11-27 14:09

    I have the same problem and I found in the custom view sample code (PieChart) of Google

    import com.example.android.customviews.R;
    

    when i comment that import line, Eclipse will notice error: "R cannot to be resolved to a variable". so you should make an import of your package similar statement above. Ex:

    import your.package.name.R;
    

    it fixes similar error for other projects of mine

提交回复
热议问题