Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to add R.raw to project?

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.raw?

like image 798
Ksice Avatar asked Jul 14 '11 10:07

Ksice


People also ask

What is r raw in Android?

The raw (res/raw) folder is one of the most important folders and it plays a very important role during the development of android projects in android studio. The raw folder in Android is used to keep mp3, mp4, sfb files, etc. The raw folder is created inside the res folder: main/res/raw.


2 Answers

Adding a raw folder to your resource folder (/res/) should do the trick.

Read more here: https://developer.android.com/guide/topics/resources/providing-resources.html

like image 188
Stefan H Singer Avatar answered Sep 16 '22 14:09

Stefan H Singer


enter image description hereRight click on package or Res folder click on new on popup then click on android resource directory

a new window will be appear change the resource type to raw and hit OK copy and past song to raw folder remember don't drag and drop song file to raw folder and song spell should be in lower case! This method is for Android Studio Also Check MY Link

like image 42
Misbah Farooqi Avatar answered Sep 16 '22 14:09

Misbah Farooqi