Before the Android system can start an app component, the system must know that the component exists by reading the app's AndroidManifest.xml file (the "manifest" file). Your app must declare all its components in this file, which must be at the root of the app project directory. 

The manifest does a number of things in addition to declaring the app's components, such as:

  • Identify any user permissions the app requires, such as Internet access or read-access to the user's contacts.
  • Declare the minimum API Level required by the app, based on which APIs the app uses.
  • Declare hardware and software features used or required by the app, such as a camera, bluetooth services, or a multitouch screen.
  • API libraries the app needs to be linked against (other than the Android framework APIs), such as the Google Maps library.
  • And more

  Activities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run. However, broadcast receivers can be either declared in the manifest or created dynamically in code (as BroadcastReceiver objects) and registered with the system by calling registerReceiver().

  For every resource that you include in your Android project, the SDK build tools define a unique integer ID, which you can use to reference the resource from your app code or from other resources defined in XML. For example, if your app contains an image file named logo.png (saved in the res/drawable/ directory), the SDK tools generate a resource ID named R.drawable.logo, which you can use to reference the image and insert it in your user interface.

  One of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations. For example, by defining UI strings in XML, you can translate the strings into other languages and save those strings in separate files. Then, based on a language qualifier that you append to the resource directory's name (such as res/values-fr/ for French string values) and the user's language setting, the Android system applies the appropriate language strings to your UI.

Android -- The Manifest File的更多相关文章

  1. 【转】Android必备知识点- Android文件(File)操作

    Android 使用与其他平台上基于磁盘的文件系统类似的文件系统. 本文讲述如何使用 Android 文件系统通过 File API 读取和写入文件. File 对象适合按照从开始到结束的顺序不跳过地 ...

  2. 【转】Android出现“Read-only file system”解决办法

    原文网址:http://www.111cn.net/sj/android/44496.htm 下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友 ...

  3. (转载)Android出现“Read-only file system”解决办法

    下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友可参考参考.   Android-出现Read-only file system的解决方法 输 ...

  4. Android文件(File)操作

    Android 使用与其他平台上基于磁盘的文件系统类似的文件系统. 本文讲述如何使用 Android 文件系统通过 File API 读取和写入文件. File 对象适合按照从开始到结束的顺序不跳过地 ...

  5. Manifest File

    [Manifest File] on every build, webpack generates some webpack runtime code, which helps webpack do ...

  6. Android studio 配置file encoding 无效,中文乱码解决办法

    通过配置Android studio 配置file encoding 无效,中文乱码,问题出现在java编译的时候jack采用了默认编码(中文windows默认的GBK编码)而乱码,所以不管更改bui ...

  7. Android中使用File文件进行数据存储

    Android中使用File文件进行数据存储 上一篇学到使用SharedPerences进行数据存储,接下来学习一下使用File进行存储 我们有时候可以将数据直接以文件的形式保存在设备中, 例如:文本 ...

  8. 关于eclipse android 在manifest改app应用包名注意事项

    在我刚学android 时候,然后立即就做项目.那时连eclipse 使用都不是很熟练.很多功能都不知道.新手如果这时去改app应用的包名,没有改好会变成所有控件在R文件里面id都找不到. 先上两张图 ...

  9. 转-Android 之 使用File类在SD卡中读取数据文件

    如果需要在程序中使用sdcard进行数据的存储,那么需要在AndroidMainfset.xml文件中 进行权限的配置: Java代码:   <!-- 在sd中创建和删除文件的权限 --> ...

随机推荐

  1. mysql数据库优化小结

    一.常见数据库的优化操作 1.表的设计要符合三范式. 2.添加适当的索引,索引对查询速度影响很大,必须添加索引.主键索引,唯一索引,普通索引,全文索引 3.添加适当存储过程,触发器,事务等. 4.读写 ...

  2. Jmeter安装

    安装下载方法:http://www.jb51.net/softjc/266834.html 下载地址:http://jmeter.apache.org/download_jmeter.cgi Wind ...

  3. web.config

    参数上传和文件上传大小限制调整,参数上传最大2097151 <system.web> <httpRuntime requestValidationMode="2.0&quo ...

  4. 查询数组里有多少个数在[L,R]范围中(二分)

    使用两次二分即可得到这个值 比如现在有一个vector<int> vec,里面存放的是有序数列. 我们现在希望找出范围在[L,R]之间的数有多少个. 则有cnt = upper_bound ...

  5. quartus II PIN脚相关之一

    FPGA设计中有时候会改变输入输出名称,但是会带来一个问题,在PIN 叫配置页面上会有余留的久名称的Pin脚.如实例中,把 FPGA_CLK_50MHZ 名称修改为 FPGA_CLK,经过编译综合之后 ...

  6. Django base view

    class django.views.generic.base.View 它是基类的基类,其它View基类都是从这继承的. 官例: from django.http import HttpRespon ...

  7. apache2 tomcat https配置-被忽悠进了CentOS 6

    因为需要让ios应用可以绕过appstore,要找个https的地方放ipa,决定使用已有http server. 首先需要说明的是,apache可以通过反向代理方式将用户的https分发到tomca ...

  8. [翻译]用神经网络做回归(Using Neural Networks With Regression)

    本文英文原文出自这里, 这个博客里面的内容是Java开源, 分布式深度学习项目deeplearning4j的介绍学习文档. 简介: 一般来说, 神经网络常被用来做无监督学习, 分类, 以及回归. 也就 ...

  9. rediscluster 集群操作(摘抄)

    一:关于redis cluster 1:redis cluster的现状 目前redis支持的cluster特性 1):节点自动发现 2):slave->master 选举,集群容错 3):Ho ...

  10. Linux下的段错误(Segmentation fault)

    Linux开发中常见段错误问题原因分析 1 使用非法的内存地址(指针),包括使用未经初始化及已经释放的指针.不存在的地址.受系统保护的地址,只读的地址等,这一类也是最常见和最好解决的段错误问题,使用G ...