如何正确包括非Eclipse的Andr​​oid应用程序支持库 [英] How to correctly include the support library in non-Eclipse Android application

查看:201
本文介绍了如何正确包括非Eclipse的Andr​​oid应用程序支持库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想如何让Android的支持库,包括和编译的Eclipse之外。我使用Linux作为我的生成环境,我不使用创建应用,只有基本的Andr​​oid SDK任何IDE。我只是过来这个问题的答案关于Eclipse,但我怎么能做到用只蚂蚁和Android SDK?

I am thinking how to get Android' s support library to include and compile outside Eclipse. I am using Linux as my build environment and I am not using any IDE for creating apps, only the basic Android SDK. I have only come over answers to this question regarding Eclipse, but how can I do it using only Ant and Android SDK?

推荐答案

网​​格布局假如你不使用:

第1步:复制 Android的支持 - v4.jar Android的支持 - v13.jar 从您的SDK到库/ 项目的目录。

Step #1: Copy android-support-v4.jar or android-support-v13.jar from your SDK into the libs/ directory of your project.

第二步:没有第2步

选择 Android的支持 - v13.jar 如果您在使用本机的碎片(相对于Android的支持包的反向移植自己),你想要的东西使用它们像 ViewPager 是Android的支持包的一部分。

Choose android-support-v13.jar if you are using native fragments (versus the Android Support package's own backport) and you want to use them with things like ViewPager that are part of the Android Support package.

网​​格布局使事情变得有点复杂,因为它是一个Android库项目。您将需要遵循<一个href=\"http://developer.android.com/tools/projects/projects-cmdline.html#ReferencingLibraryProject\">the对于如何在命令行项目使用Android库项目,大概工作了正式项目的副本的指令。

GridLayout makes things a bit more complicated, in that it is an Android library project. You would need to follow the instructions for how to use an Android library project in a command-line project, probably working off of a copy of the official project.

所有的这些东西可以在任何地方安装你的SDK的演员/ 目录中找到。

All of this stuff can be found in the extras/ directory of wherever your SDK is installed.

这篇关于如何正确包括非Eclipse的Andr​​oid应用程序支持库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆