导入的jar库到机器人工作室机器人、工作室、jar

2023-09-12 22:00:34 作者:闭上眼/说再见。

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