Role of R.java in Andriod


What is the role of R.java?


R stands for resource.R.java is a abstraction between the java files and different resources which are placed in ‘res’ folder.In Android,R.java is an auto-generated file by aapt(Android Asset Packaging Tool) that contains resource IDs for all the resources (such as strings, layouts, drawables, colours  etc) of res/directory.
Android studio automatically will generate R.java when you delete R.jar file.Where R.java present in Android studio?:-  In Android studio ,the R.java is located in app/build/generated/source/r/debug .

Leave a Reply

Your email address will not be published. Required fields are marked *