Android: How to add R.raw to project?

后端 未结 13 1340
半阙折子戏
半阙折子戏 2021-02-04 23:39

How I could add R.raw class to my android project? Now I haven\'t /res/raw folder at all (and class as well). And I can\'t find any tools in eclipse to do that. So how to add R.

13条回答
  •  醉梦人生
    2021-02-05 00:10

    Here is the string to access files in raw folder. Replace filename with name of your file.

    android.resource://" + getPackageName() + "/" + R.raw.filename
    

提交回复
热议问题