Android开发-API指南-<uses-library>
<uses-library>
英文原文:http://developer.android.com/guide/topics/manifest/uses-library-element.html
采集(更新)日期:2014-7-10
搬迁自原博客:http://blog.sina.com.cn/s/blog_48d491300100zmwz.html
Google Play 过滤机制
Google Play 利用 Manifest 文件中声明的 <uses-library> 元素进行过滤,
使得无法满足应用程序对链接库需求的设备就无法安装该应用程序。
关于过滤机制的详细信息,请参阅文章Google Play 过滤器
- 语法:
-
<uses-library
android:name="string"
android:required=["true" | "false"] /> - 包含于:
<application>- 说明:
- 定义应用程序必须链接的公共库。 本元素把程序包的类装载器中需要包含的库代码通知系统。
所有的
android包(比如android.app、android.content、android.view、android.widget)都包含在默认库中,所有的应用程序都会自动进行链接。 不过有些包(比如maps)位于单独的库中,他们不会被自动链接进来。 请参阅所用包的文档,以确定其代码包含于哪个库中。本元素还会影响应用程序在某些设备上的安装,以及在 Google Play 上的可用性:
- 安装
- 如果给出了本元素,并且其
android:required属性设为true,PackageManager系统将只允许在提供本库的设备上安装该应用程序。
android:required属性将在后续章节详细说明。 - 属性:
-
android:name- 库的名称。该名称在所用包的文档中给出。 例如,“
android.test.runner”是包含了 Android 测试类的包。 android:required- 布尔值,指明应用程序是否必需由
android:name指定的库:"true":缺少此库的话,应用程序就无法正常运行。系统将不允许应用程序在不提供此库的设备上安装。"false":库存在的话,应用程序就会使用,但它设计时是考虑缺少此库也能正常工作的。 即使此库不存在,系统也允许安装应用程序。 如果用了“false”,那就必须在运行时检查此库是否可用。为了检查库的存在性,可以用反射来确定某个类是否可用。
默认值是“
true”。引入自 API 级别 7 。
- 引入自:
- API 级别 1
- 参阅:
Android开发-API指南-<uses-library>的更多相关文章
- Android开发-API指南-<permission>
<permission> 英文原文:http://developer.android.com/guide/topics/manifest/permission-element.html 采 ...
- Android开发-API指南-<provider>
<provider> 英文原文:http://developer.android.com/guide/topics/manifest/provider-element.html 采集(更新 ...
- Android开发-API指南-应用程序开发基础
Application Fundamentals 英文原文:http://developer.android.com/guide/components/fundamentals.html 采集(更新) ...
- Android开发-API指南-Intent和Intent过滤器
Intents and Intent Filters 英文原文:http://developer.android.com/guide/components/intents-filters.html 采 ...
- Android开发-API指南-Android简介
Introduction to Android 英文原文:http://developer.android.com/intl/zh-cn/guide/index.html 采集日期:2014-4-16 ...
- Android开发-API指南-设备兼容性
Device Compatibility 英文原文:http://developer.android.com/guide/practices/compatibility.html 采集日期:2014- ...
- Android开发-API指南-任务和回退栈
Task and Back Stack 英文原文: http://developer.android.com/guide/components/tasks-and-back-stack.html 采集 ...
- 【最后一篇API译文】Android开发-API指南- Contacts Provider
Contacts Provider 今年加入了某字幕组,加之杂事颇多,许久未添新文了,惭愧之极. 在听闻 Google 即将重返中国后,近日忽又发现官方网站正在放出 API 中文版,比如本文.当然不是 ...
- Android开发-API指南-创建 Content Provider
Creating a Content Provider 英文原文:http://developer.android.com/guide/topics/providers/content-provide ...
- Android开发-API指南-Content Provider基础
Content Provider Basics 英文原文:http://developer.android.com/guide/topics/providers/content-provider-ba ...
随机推荐
- SPOJ #440. The Turtle´s Shortest Path
Coding a Dijkstra is not hard. %70 of my time spent on tackling TLE, as my last post. Dijkstra works ...
- erlang反编译
Beam = code:which(MyModuleName). {ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(Beam,[abstract_ ...
- windows7使用Source insight上远程修改ubuntu共享内核源码
由于本人阅读喜欢使用source insight.前段时间接触了linux核代码,而这份代码只能放在ubuntu服务器上编译,刚开始的时候是在windows上修改,完了之后再copy到服务器上去编译, ...
- SQL server 学习笔记1
1.查询安装的排序规则选项喝当前的排序规则服务器属性 select * from fn_helpcollations(); 2.查看当前服务器的排序规则 select serverproperty(' ...
- Android权限之sharedUserId和签名
转自:http://blog.csdn.net/hmg25/article/details/6447067 最近在做个东西,巧合碰到了sharedUserId的问题,所以收集了一些资料,存存档备份. ...
- 数据库随机取n条记录
SQL Server SELECT TOP N * FROM 表名 ORDER BY NEWID() My SQL SELECT * FROM 表名 ORDER BY RAND() ...
- 不用删除整个Maven本地库文件夹,Eclipse下直接更新Maven库
- Tomcat远程调试catalina.sh的配置
#!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license ...
- Java compiler level does not match the version of the installed Java project facet. springmvc1 和 Target runtime Apache Tomcat v7.0 is not defined.
Java compiler level does not match the version of the installed Java project facet.springmvc1 : Targ ...
- system函数
system两层含义: 1.正确退出后.还需要再判断,操作成功或者操作失败. 2.错误退出. #include <stdio.h> #include <stdlib.h> #i ...