Referencing a library project
If you are developing an application and want to include the shared code or resources from a library project, you can do so easily by adding a reference to the library project in the application project's Properties.
To add a reference to a library project, follow these steps:
- In the Package Explorer, right-click the dependent project and select Properties.
- In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
- Click Add to open the Project Selection dialog.
- From the list of available library projects, select a project and click OK.
- When the dialog closes, click Apply in the Properties window.
- Click OK to close the Properties window.
As soon as the Properties dialog closes, Eclipse rebuilds the project, including the contents of the library project.
Figure 2 shows the Properties dialog that lets you add library references and move them up and down in priority.
If you are adding references to multiple libraries, note that you can set their relative priority (and merge order) by selecting a library and using the Up and Down controls. The tools merge the referenced libraries with your application starting from lowest priority (bottom of the list) to highest (top of the list). If more than one library defines the same resource ID, the tools select the resource from the library with higher priority. The application itself has highest priority and its resources are always used in preference to identical resource IDs defined in libraries.
Declaring library components in the the manifest file
In the manifest file of the application project, you must add declarations of all components that the application will use that are imported from a library project. For example, you must declare any <activity>
, <service>
, <receiver>
, <provider>
, and so on, as well as<permission>
, <uses-library>
, and similar elements.
Declarations should reference the library components by their fully-qualified package names, where appropriate.
For example, the TicTacToeMain example application declares the library Activity GameActivity
like this:
<manifest> ... <application> ... <activity android:name="com.example.android.tictactoe.library.GameActivity" /> ... </application> </manifest>
相关推荐
Android集成开发环境ADT+Eclipse+Android SDK,已经在Eclipse基础上集成装好,解压就可用
这个插件是 eclipse 的 android 插件,大家无法在线更新是可以用来手动更新.低于0.9.5的版本不适合2.1的固件.
这个插件是 eclipse 的 android 插件,大家无法在线更新是可以用来手动更新.
之前下载的ADT 和SDK放到Eclipse总报错,后来找到这个直接集成好的eclipse,就是稍微大点,但是用起来方便这是百度的地址!
安卓ADT必不可缺少的工具,主要为Eclipse插件,Eclipse扩展安卓应首先应当安装,必不可少
以图文并茂的方式手把手教你如何下载jdk8.11,安装jdk,下载eclipse,安装eclipse,下载ADT,安装ADT;下载Android sdk,安装Android SDK---最终帮你完成Eclipse+Android开发环境的安装。 安装完毕教你如何验证JDK...
eclipse Android ADT用于eclipse搭建Android开发环境所使用的工具
在eclipse中添加android ADT
------------- adt-bundle-windows-x86-xxx , Android ADT by Eclipse 中文插件安装指南 ----------- 2009-6-18 JSP中文学习网独家发布 www.jsphelp.com 次汉化包是由 MyEclipse 7.1 汉化包修改 2016-5-8 ...
ADT Plugin for Eclipse
由于资源太大,文档里保存的是下载地址。包含sdk2.2;2.3;4.3;4.4版本以及最新吧eclipse和adt。
本包 包含: JDK 8 64位 JDK 7 64位 JDK 7 32位 ...安卓开发集成环境 SDK ADT eclipse JDK adt bundle windows x86 64 20140321 不用装SDK ADT 用集成 里面什么都有 就能开发 更稳定 更快 更好
Eclipse的Android开发插件 ADT-23.0.6 Eclipse的Android开发插件 ADT-23.0.6
在eclipse中安装android开发插件非常不容易,因为很多相应的sdk和adt更新路径都被屏蔽,因此不能下载和更新,另外,下载离线安装一定要注意版本匹配,最新版的eclipse sdk4.2一定要安装android sdkr16和ADT20才能...
想要学习Android手机开发的朋友,必需要会的!哈哈!
Eclipse ADT 离线安装包,用于Eclipse安装ADT进行安卓程序开发
安装方法: 打开eclipse后,在Help->Install New Software 弹出对话框,点击“Add...”,再弹出框,选择“Archive...”,选择这个ZIP文件,接着就Next...,eclipse会联网下载些文件,最后就finish
ADT,eclipse 安卓
包含了ADT-10.0.0.zip 和Eclipse 中安装ADT插件的过程