添加JAR Android Studio中1.0 [英] Add JAR in Android Studio 1.0

查看:222
本文介绍了添加JAR Android Studio中1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要一个外部库添加到我的Andr​​oid工作室1.0项目。计算器在其他的答案似乎是过时的。至少我不能在我的项目找到了lib目录的文件夹,不知道如何创建一个。

I want to add an external library to my Android Studio 1.0 project. The other answers at stackoverflow seem to be outdated. At least I can't find a "lib" folder in my project and don't know how to create one.

编辑:正如我指出我指的是Android的工作室的最新版本。我想有这个版本,并提到了一之间的一些差异。该快捷方式没有工作,我的文件夹构造器变化了很多。我创建了一个新的HelloWorld项目来验证它。

edit: As I was pointing out I am referring to the latest version of Android Studio. I assume there are some differences between this version and the one referred to. The shortcuts are not working and my folder structor varies a lot. I created a new HelloWorld project to verify it.

推荐答案

在模块要使用的罐子,创建一个 LIB 文件夹,然后把你的罐子在它

In the module that want to use the jar, create a lib folder and place your jar in it.

在模块的build.gradle 文件,在相关性添加此组:

compile files('lib/my_jar.jar')

这篇关于添加JAR Android Studio中1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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