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的更多相关文章

  1. Android manifest之manifest标签详细介绍

    AndroidManifest详细介绍 本文主要对AndroidManifest.xml文件中各个标签进行说明.索引如下: 概要PART--01 manifest标签PART--02 安全机制和per ...

  2. Android manifest之系统自带的permission

    Android manifest之系统自带的permission 本文描述Android系统自带的permission.点击查看:“关于permission的原始定义和说明”.点击查看:“Androi ...

  3. Android Manifest.xml文件的结构及作用

    原文链接:http://android.eoe.cn/topic/android_sdk 每一个应用程序在工程的根目录下必须要有一个AndroidManifest.xml文件(一定要用这个名称).这个 ...

  4. Android manifest文件中的标签详细介绍

    官方文档 概要 每一个Android应用都应该包含一个manifest文件,即AndroidManifest.xml.它包含了程序运行的一些必备信息,比如:--为Java应用程序指定一个独一无二的名字 ...

  5. 【记】研究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 ...

  6. Android manifest 获取源代码

    /********************************************************************************* * Android manifes ...

  7. Android API之android.provider.ContactsContract.Data

    android.provider.ContactsContract.Data Constants for the data table, which contains data points tied ...

  8. android Manifest.xml选项

    结构 继承关系 public final class Manifest extends Object java.lang.Object android.Manifest 内部类 class  Mani ...

  9. Viewpager+Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx bytes

    Viewpager + Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx byt ...

  10. Android Manifest.xml详解

    一.关于AndroidManifest.xml AndroidManifest.xml 是每个android程序中必须的文件.它位于整个项目的根目录,描述了package中暴露的组件(activiti ...

随机推荐

  1. ZendFramework2 源码分析 init_autoloader.php

    // Composer autoloading if (file_exists('vendor/autoload.php')) { // 加载自动加载器 $loader = include 'vend ...

  2. android android:textColor="@[package:]color/filename" ----Color/filename文字颜色selector状态列表

    文字颜色selector状态列表

  3. 微软的OneDrive研究~

    Dropbox 很好,唯一觉得不爽的是只能同步指定的目录.不过被墙之后就不那么方便了,所以改用微软的 Live Mesh,缺点是支持的设备少(仅 PC 和 Mac). https://technet. ...

  4. Android 圆形按钮实现

    项目中用到的圆形按钮,做个半天,用sharp形式实现,样式代码如下: <Button android:id="@+id/btn_5" android:layout_width ...

  5. 电子科大POJ "3*3矩阵的乘法"

    3阶矩阵的乘法 Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) c-source ...

  6. OpenWrt 学习网址

    http://m.blog.csdn.net/blog/woods2001/8137755

  7. Unity扩展让枚举视图中变成多选框

    如图: 定义属性描述特性(因为没有描述的数据,让绘制类去绘制所以为空) using UnityEngine; using System.Collections; public class EnumFl ...

  8. Unity 使用实体类

    故事的由来: 正在开发打飞机的游戏,遇到这样的数据结构,游戏有很多关卡-> 每个关卡有几波怪物->每一波里面有怪物和数量 [] 关卡 { []波{ {怪物,数量},{怪物,数量},{怪物, ...

  9. MySQL Workbench导出数据库

    步骤: 1. 打开mysql workbench,进入需要导出的数据库,点击左侧栏的[Management]tab键. 2. 点选要输出的数据库 点击[Data Export] 选在要输出的数据库 选 ...

  10. 认识Log4j

    Log4j是一个非常强大的log记录软件,下面我们就来看看在项目中如何使log4j. 首先当然是得到log4j的jar档,推荐使用1.2.X版,下载地址: http://logging.apache. ...