如何与资源增加的Android库,不使用Eclipse [英] How to add Android libraries with resources without using Eclipse
问题描述
我想安装了Android V7 appcompat库才能使用的动作条。在
I would like to setup the Android v7 appcompat library in order to use the ActionBar. At
<一个href="http://developer.android.com/tools/support-library/setup.html#">http://developer.android.com/tools/support-library/setup.html#
有一个教程如何与使用Eclipse的资源库添加。由于我没有使用Eclipse,我想通过手动编辑和复制所需的文件添加库和附带的资源。任何人都可以或许为我提供这个必要的步骤?
there is a tutorial how to add libraries with resources using Eclipse. Since I am not using Eclipse I would like to add the library and the accompanying resources by manually editing and copying the required files. Can anyone perhaps provide me with this necessary steps?
推荐答案
好了,终于让我找到它。该关键字的库项目和命令行的。
OK, finally I found it out. The keywords are library project and command line.
为了使用以下步骤为我工作的命令行appcompat V7作为库项目添加到自己的项目:
In order to add the appcompat v7 as library project to an own project using the command line the following steps worked for me:
-
创建文件夹的副本
Android的SDK /演员/安卓/支持/ V7 / appcompat
到自己的项目空间。你可以把它叫做什么,我们将保留appcompat
的名字。
Create a copy of the folder
android-sdk/extras/android/support/v7/appcompat
into the own project space. You may call it anything, we will keep theappcompat
name.
CD MY_PROJECT
cd my_project
CP -r Android的SDK /演员/安卓/支持/ V7 / appcompat appcompat
cp -r android-sdk/extras/android/support/v7/appcompat appcompat
生成的的build.xml 的文件库项目:执行
Generate a build.xml file for the library project: execute
Android的更新LIB项目--path appcompat
android update lib-project --path appcompat
引用库项目,并创建了依赖项目的 project.properties
文件
reference the library project and create the dependency in the project's project.properties
file
android.library.reference.1 = appcompat
android.library.reference.1=appcompat
建的主要项目:
蚂蚁干净调试
这会自动生成支持库了。 通常你需要一个干净的构建添加库,或改变目标的版本后,使构建拿起所有的变化。
This will automatically build the support library, too. You generally need a clean build after adding a library or changing the target versions, so the build picks up all the changes.
这些都是有用的资源:
- http://developer.android.com/tools/projects/projects- cmdline.html
- <一个href="http://stackoverflow.com/questions/11236507/adding-android-library-project-to-an-android-project-$p$pvents-ant-from-building">Adding机器人库项目到Android项目prevents蚂蚁从建筑
- http://developer.android.com/tools/projects/projects-cmdline.html
- Adding android library project to an android project prevents Ant from building
这篇关于如何与资源增加的Android库,不使用Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!