导入的jar库到机器人工作室 [英] importing jar libraries into android-studio

查看:108
本文介绍了导入的jar库到机器人工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

android-studio 0.2.7
Fedora 18

您好,

我想给jtwitter jar添加到我的项目。

I am trying to add the jtwitter jar to my project.

首先,我试着做了以下内容:

First I tried doing the following:

1) Drag the jtwitter.jar into the root directory of my project explorer, see picture
2) File | project structure
3) Modules | yamba-yamba | dependencies
4) Click the plus sign | jars or directories | and navigate to jtwitter jar | click ok

当我导入的jar文件我得到以下错误:

When I import the jar file I get the following error:

import winterwell.jtwitter.Twitter;

Cannot resolve symbol winterwell
Gradle: error: package winterwell.jtwitter does not exist

我研究后发现,Android的工作室有一些问题,你必须编辑 build.gradle 文件了。

所以,我想加入这个我build.gradle文件:

So I tried adding this to my build.gradle file:

dependencies {
    compile files('libs/jtwitter.jar')

和得到一个错误信息:无法解析符号依赖

And got an error message: cannot resolve symbol dependencies

另外一个问题,这里将libs文件夹是。这是否意味着外部库

Another question, where would the libs folder be. Does it mean the External Libraries?

任何帮助将是最有益的,

Any help will be most helpfull,

推荐答案

尝试添加build.gradle而不是顶层构建文件依赖于您的应用程序(扬巴 - 扬巴)

try to add the dependency in your App's(Yamba-Yamba) build.gradle instead of the top level build file

这篇关于导入的jar库到机器人工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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