Alex Rivera | Logout

In Android applications what is the role of "R.java"?

Asked 2012-07-28T06:19:37.813
27

Android applications have an automatically generated file called "R.java". Please explain its purpose.

E.g.

  • What is contained in it?
  • What generates it?

Duplicate: What is the concept behind R.java?

Edit
Report

1 Answer

5

R.java is autogenerated on build. It's content is based on the resource files (including layouts and preferences).

When you delete it, it gets recreated, but if you create your own, you will get into trouble as the build system will not be able to replace it.

answered 2012-07-28T06:24:05.280

Your Answer