Android manifest
manifest是Android应用程序的配置文,在这里指定了改程序的资源、权限等内容,一般的manifest文件如下
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.hello"
android:versionCode="1"
android:versionName="1.0" > <uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="main" />
<intent-filter >
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".xxxx"
android:label="@string/xxx"
android:screenOrientation="portrait">
</activity>
</application> </manifest>
其中比较重要的配置有
<uses-permission />指定了改程序的权限。
<uses-sdk/>指定了程序使用的API版本,也就是可运行的最小版本。
<application/>中注册了本程序使用的Activity,可以有多个Activity,每个activity都有android:name属性,该属性前面多了一个.,和包名联合起来指定了该activity。每个application都一个程序启动时的默认activity,由<intent-filter >指定。换言之,一般而言,有且仅有一个activity具有<intent-filter >属性。
Android manifest的更多相关文章
- Android manifest之manifest标签详细介绍
AndroidManifest详细介绍 本文主要对AndroidManifest.xml文件中各个标签进行说明.索引如下: 概要PART--01 manifest标签PART--02 安全机制和per ...
- Android manifest之系统自带的permission
Android manifest之系统自带的permission 本文描述Android系统自带的permission.点击查看:“关于permission的原始定义和说明”.点击查看:“Androi ...
- Android Manifest.xml文件的结构及作用
原文链接:http://android.eoe.cn/topic/android_sdk 每一个应用程序在工程的根目录下必须要有一个AndroidManifest.xml文件(一定要用这个名称).这个 ...
- Android manifest文件中的标签详细介绍
官方文档 概要 每一个Android应用都应该包含一个manifest文件,即AndroidManifest.xml.它包含了程序运行的一些必备信息,比如:--为Java应用程序指定一个独一无二的名字 ...
- 【记】研究Sharding-JDBC遇到的一个异常(Caused by: io.shardingsphere.core.exception.ShardingException: Cannot get uniformed table structure for `t`. The different meta data of actual tables are as follows)
一.异常信息 Caused by: io.shardingsphere.core.exception.ShardingException: Cannot get uniformed table str ...
- Android manifest 获取源代码
/********************************************************************************* * Android manifes ...
- Android API之android.provider.ContactsContract.Data
android.provider.ContactsContract.Data Constants for the data table, which contains data points tied ...
- android Manifest.xml选项
结构 继承关系 public final class Manifest extends Object java.lang.Object android.Manifest 内部类 class Mani ...
- Viewpager+Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx bytes
Viewpager + Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx byt ...
- Android Manifest.xml详解
一.关于AndroidManifest.xml AndroidManifest.xml 是每个android程序中必须的文件.它位于整个项目的根目录,描述了package中暴露的组件(activiti ...
随机推荐
- java读取xml文件报“org.xml.sax.SAXParseException: Premature end of file” .
背景:java读取xml文件,xml文件内容只有“<?xml version="1.0" encoding="UTF-8"?>”一行 java读取该 ...
- Javascript经典实例 - 字符串
1] 'this is a string'这是字符串直接量,new String('this is a string')这是字符串对象,字符串对象可以用字符串对象所带的属性和方法,直接量在“表面上”也 ...
- ThinkPHP框架一
1.1 框架的概念 框架其实就是可重用代码的集合,框架的代码是框架架构的代码,不是业务逻辑代码,框架代码保护类.方法.函数等等,框架代码按照一定的规则组合起来就形成了框架. 1.2 不使用框架开发的时 ...
- information_schema.columns 学习
每一个表中的每一列都会在information_schema.columns表中对应一行 1.informaiton_schema.columns 常用列: 1.table_catalog :不管是t ...
- 在Word中直接用快捷键查找选中文本
在word中选中文本后按Ctrl+F,有些时候选中文本会自动出现在“查找内容”文本框中,而有些时候显示的还是上次选中的文本.这是因为只有当Word认为选中的文本是一个“词”时,选中文本才会自动出现在“ ...
- linux环境下deb格式文件转换成rpm格式
以 alien_8.87.tar.gz 为例: 下载.安装 alien_8.87.tar.gz [root@shyn ~]# wget http://ftp.de.debian.org/debian/ ...
- Linux的环境变量配置
以下都是环境变量相关的配置文件 1)/etc/enviroment 是系统的环境变量. (2)/etc/profile: 是所有用户的环境变量.当用户第一次登录时,该文件被执行. 并从/etc/pro ...
- LeeCode-Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return t ...
- LaTex 下编译后不能显示中文,或者中文乱码
在 Sublime Text 中编辑以下文件并保存(第一行的注释很重要),按下 Cammand + B 编译: %!TEX program = xelatex \documentclass[UTF8] ...
- 【转】Linux内核调试方法总结
目录[-] 一 调试前的准备 二 内核中的bug 三 内核调试配置选项 1 内核配置 2 调试原子操作 四 引发bug并打印信息 1 BUG()和BUG_ON() 2 dump_sta ...