0% found this document useful (0 votes)
13 views3 pages

11 Android R.java File

The Android R.java file is an auto-generated file that contains resource IDs for all resources in the res/ directory, created by the Android Asset Packaging Tool (aapt). It includes static nested classes for various resource types such as menu, id, layout, drawable, and string, allowing developers to reference these resources in their code. Deleting the R.java file will result in it being automatically recreated by Android.

Uploaded by

asmabsit204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

11 Android R.java File

The Android R.java file is an auto-generated file that contains resource IDs for all resources in the res/ directory, created by the Android Asset Packaging Tool (aapt). It includes static nested classes for various resource types such as menu, id, layout, drawable, and string, allowing developers to reference these resources in their code. Deleting the R.java file will result in it being automatically recreated by Android.

Uploaded by

asmabsit204
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Android R.

java file
Android [Link] is an auto-generated file by aapt (Android Asset Packaging
Tool) that contains resource IDs for all the resources of res/ directory.

If you create any component in the activity_main.xml file, id for the


corresponding component is automatically created in this file. This id can be
used in the activity source file to perform any action on the component.

Note: If you delete [Link] file, android creates it automatically.

Let's see the android [Link] file. It includes a lot of static nested classes such
as menu, id, layout, attr, drawable, string etc.

1. /* AUTO-GENERATED FILE. DO NOT MODIFY.


2. *
3. * This class was automatically generated by the
4. * aapt tool from the resource data it found. It
5. * should not be modified by hand.
6. */
7.
8. package [Link];
9.
10. public final class R {
11. public static final class attr {
12. }
13. public static final class drawable {
14. public static final int ic_launcher=0x7f020000;
15. }
16. public static final class id {
17. public static final int menu_settings=0x7f070000;
18. }
19. public static final class layout {
20. public static final int activity_main=0x7f030000;
21. }
22. public static final class menu {
23. public static final int activity_main=0x7f060000;
24. }
25. public static final class string {
26. public static final int app_name=0x7f040000;
27. public static final int hello_world=0x7f040001;
28. public static final int menu_settings=0x7f040002;
29. }
30. public static final class style {
31. /**
32. Base application theme, dependent on API level. This theme
is replaced
33. by AppBaseTheme from res/values-vXX/[Link] on newer
devices.
34.
35.
36. Theme customizations available in newer API levels can g
o in
37. res/values-vXX/[Link], while customizations related to
38. backward-compatibility can go here.
39.
40.
41. Base application theme for API 11+. This theme completely
replaces
42. AppBaseTheme from res/values/[Link] on API 11+ devic
es.
43.
44. API 11 theme customizations can go here.
45.
46. Base application theme for API 14+. This theme completely
replaces
47. AppBaseTheme from BOTH res/values/[Link] and
48. res/values-v11/[Link] on API 14+ devices.
49.
50. API 14 theme customizations can go here.
51. */
52. public static final int AppBaseTheme=0x7f050000;
53. /** Application theme.
54. All customizations that are NOT specific to a particular API-level
can go here.
55. */
56. public static final int AppTheme=0x7f050001;
57. }
58. }

You might also like