List file of Android system programming introduction series

As mentioned in the previous article, after loading an application, the Android system will first read the androidmanifest.xml manifest file of the application, and then load the following things according to the manifest file. Therefore, to develop an application, it is natural to know what is recorded in the manifest file first. Generally, the content defined in the manifest file is called static registration. Correspondingly, the content that can be defined in the code is called dynamic registration.

The storage location of the manifest file is the root directory of the application, and the file name is fixed. It must be androidmanifest.xml. The contents contained in the manifest file can be found in the application manifest file on the Android official website. The main contents are as follows.

package@H_ 404_ 8 @ application package name attribute, which should ensure the uniqueness of the system, that is, there can be no two applications with the same package name on the Android machine on which the application runs. If you want to install two applications with the same package name on the same Android machine, you can't even install it successfully. On the development environment androidstudio, it is recommended that the package attribute in the manifest file be consistent with the applicationid in the build.gradle file under the main application module. Of course, the official website also gives inconsistent modification schemes, but it is not recommended during the development process unless there are special requirements.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>