Android -- The Manifest File
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的更多相关文章
- 【转】Android必备知识点- Android文件(File)操作
Android 使用与其他平台上基于磁盘的文件系统类似的文件系统. 本文讲述如何使用 Android 文件系统通过 File API 读取和写入文件. File 对象适合按照从开始到结束的顺序不跳过地 ...
- 【转】Android出现“Read-only file system”解决办法
原文网址:http://www.111cn.net/sj/android/44496.htm 下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友 ...
- (转载)Android出现“Read-only file system”解决办法
下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友可参考参考. Android-出现Read-only file system的解决方法 输 ...
- Android文件(File)操作
Android 使用与其他平台上基于磁盘的文件系统类似的文件系统. 本文讲述如何使用 Android 文件系统通过 File API 读取和写入文件. File 对象适合按照从开始到结束的顺序不跳过地 ...
- Manifest File
[Manifest File] on every build, webpack generates some webpack runtime code, which helps webpack do ...
- Android studio 配置file encoding 无效,中文乱码解决办法
通过配置Android studio 配置file encoding 无效,中文乱码,问题出现在java编译的时候jack采用了默认编码(中文windows默认的GBK编码)而乱码,所以不管更改bui ...
- Android中使用File文件进行数据存储
Android中使用File文件进行数据存储 上一篇学到使用SharedPerences进行数据存储,接下来学习一下使用File进行存储 我们有时候可以将数据直接以文件的形式保存在设备中, 例如:文本 ...
- 关于eclipse android 在manifest改app应用包名注意事项
在我刚学android 时候,然后立即就做项目.那时连eclipse 使用都不是很熟练.很多功能都不知道.新手如果这时去改app应用的包名,没有改好会变成所有控件在R文件里面id都找不到. 先上两张图 ...
- 转-Android 之 使用File类在SD卡中读取数据文件
如果需要在程序中使用sdcard进行数据的存储,那么需要在AndroidMainfset.xml文件中 进行权限的配置: Java代码: <!-- 在sd中创建和删除文件的权限 --> ...
随机推荐
- 发送SMS短信(JSON) 转载
http://blog.csdn.net/ldl22847/article/details/42553883 public static string GetMobileConfByUserId( ...
- invalid END header (bad central directory offset) 异常解决方法
今天版本升级时,一个ear包在传到aix下,weblogic后启动出现 invalid END header (bad central directory offset) 后来才发下是文件传输中出现了 ...
- 关于view.measure
在编写下啦刷新的项目代码的时候,在Listview的HeaderView中的head.xml文件中,根布局为RelativeLayout的时候,在计算headerView.measure的时候,出现空 ...
- html和css基础
背景: 最近公司开发BS架构的项目,公司主要业务也不是做BS开发的,没有项目经理,没有美工,没有前端,界面丑的不要不要的,哈哈哈 然后咧,使用asp.net用着用着,技术老大觉得界面怎么可以这么丑,不 ...
- oracle 认证方式
Oracle登录的时候有两种认证方式,一种是“操作系统认证”,一种是“口令文件认证”.1.当采取操作系统认证的时候,在本地用任何用户都可以以sysdba登陆:(默认方式)2.当采取口令文件认证的时候, ...
- 使用Synplify综合时保留logic
在使用Synplify综合时,此工具会自动优化我的设计. 当然此功能有好有坏,最近有个项目需要使用Chipscope观察内部信号,打开inserter就懵了,信号列表中我的设计有的是名字被改了,有的是 ...
- SQL 2012 alwayson设置只读路由
ALTER AVAILABILITY GROUP [sqlmaxiangqianbd] MODIFY REPLICA ON N'maxiangqian1' WITH (SECONDARY_R ...
- 循序渐进之Spring AOP(5) - 创建切面
在掌握了可用的增强后,接下来要做的就是精确的描述切点.前面的示例都是指定一个目标类并把增强织入到所有方法中,实际开发显然会有更精细的筛选需求,比如对所有类中名称以test结尾的方法加入监控执行时间,或 ...
- IIS中使用LocalDB遇到错误:error 50,Local Database Runtime error occurred.的解决办法
参见: [1] http://www.cnblogs.com/yjmyzz/archive/2009/10/26/1590033.html [2] http://blogs.msdn.com/b/sq ...
- supervisor 配置
1. 生成配置文件$ echo_supervisord_conf > /etc/supervisord.conf 2.修改配置文件vi /etc/supervisord.conf找到[inclu ...