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. (转)AVI文件格式解析+AVI文件解析工具

    AVI文件解析工具下载地址:http://download.csdn.net/detail/zjq634359531/7556659 AVI(Audio Video Interleaved的缩写)是一 ...

  2. silverlight列表控件ComboBox 托管代码绑订数据集合

    .xaml <ComboBox x:Name="myCombobox" Width="300" Height="30"> < ...

  3. 使用CSS和jQuery实现对话框

    因为项目中要显示一些对话框,但用alert显得太丑,后从网上找了一些插件,但有觉得不好用,因此自己试用CSS和jQuery写了一个对话框,代码如下: <!DOCTYPE html> < ...

  4. sql group by

    group by实例 实例一 数据表: 姓名 科目 分数 张三 语文 80 张三 数学 98 张三 英语 65 李四 语文 70 李四 数学 80 李四 英语 90 期望查询结果: 姓名 语文 数学 ...

  5. MySQL 常用命令(持续更新)

    停止启动MySQL服务 停止:net stop mysql启动:net start mysql 查看正在运行的线程 SHOW PROCESSLIST SHOW FULL PROCESSLIST 杀死线 ...

  6. JS函数arguments数组获得实际传参数个数

    JS与PHP在函数传参方面有点不同,PHP形参与实参个数要匹配,而JS就灵活多了,可以随意传参,实参比形参少或多都不会报错. 实参比形参多不会报错 ? 1 2 3 4 5 function say(a ...

  7. angular run()运行块

    和配置块不同,运行块在注入器创建之后被执行,它是所有AngularJS应用中第一个被执行的方法. 运行块是AngularJS中与main方法最接近的概念.运行块中的代码块通常很难进行单元测试,它是和应 ...

  8. django1.7取消syncdb后不能创建model相应表的问题

    一.在运行一个django程序时,无法创建自定义model相应的表. 我检查seetings.py文件,发现自定义的app,blog已经写到INSTALLED_APPS中, INSTALLED_APP ...

  9. tomcat7.0 处理问题

    修改tomcat的用户密码 打开tomcat的conf/tomcat-users.xml 将<user username="admin" password="123 ...

  10. [转]df命令

    linux中df命令参数功能:检查文件系统的磁盘空间占用情况.可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息. 语法:df [选项] 该命令各个选项的含义如下: -a 显示所有文件 ...