Can anybody explain me in simple words what is the use of Manifest file and R.java file in android.
Why do we need these files while making an application?
Manifest file:
- It is a declaration file.
- Here only Which activity should start first, that has been declared.
- It declares which permissions the application must have.
- It also declares the permissions that others are required to have in order to interact.
- It declares the minimum level of the Android API.
- It lists the libraries that the application must be linked.
- All the component should declared here.
- The components are activities, services, broadcast receivers, and content providers.
R.java file:
- It 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.