我无法访问Crouton库在Eclipse中 [英] I can't access Crouton library in Eclipse

查看:209
本文介绍了我无法访问Crouton库在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟所有的步骤使用crouton库使用Eclipse,但我还是一直无法使用它。

I followed all the steps for using the crouton library with Eclipse, but I still have not been able to use it.

下面是我遵循的步骤:

  1. 从GitHub上克隆Crouton库。
  2. 解压缩文件,并复制出库文件夹。
  3. 开启日食和导入库到工作区(名称更改为主)。
  4. 在主鼠标右键单击,然后选择添加支持库在Android工具选项。
  5. 开启项目属性设置构建目标为4.4.2,并勾选是图书馆'。
  6. 在这我想用crouton项目,我将其添加为从属性选项库。

当我尝试创建一个crouton毕竟这些步骤。例如:

After all these steps when I try to create a crouton. For example:

Crouton.showText(
  this, 
  getString(R.string.crouton_message2), 
  Style.CONFIRM); 

Eclipse中说Crouton不能被解析为一个变量。当我尝试导入它,我找不到它。

Eclipse says Crouton cannot be resolved to a variable. When I to try import it, I can't find it.

这些都是相同的步骤,随后在我所有的研究,这是我发现,从的 Grokking机器人和<一href="https://www.google.com.ng/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CD0QtwIwAQ&url=http://www.youtube.com/watch?v=X3l-zJWsBKo&ei=zKjXUqenHIvY7AapxYGQDA&usg=AFQjCNEhzcl-95bl0Sn_M-dcsLRXbV07Fw&sig2=LN-EpTxqwAQ9j6j1I2UFQQ&bvm=bv.59568121,d.ZGU"相对=nofollow称号=YouTube视频> YouTube视频

These are the same steps followed in all my research, here's what I found, a post from Grokking android and a YouTube video

这不是我第一次使用库。我一直在使用了android appcompat库,而现在有任何问题。我用的设置它的步骤是pretty的大致相同的是,除了在appcompat库中的所有上述步骤后,我不得不复制的jar文件,并把它在lib。需要它的项目的文件夹中。 我我缺少什么?

This is not the first time I am using a library. I have been using the android appcompat library for a while now with out any problems. And the steps i used in setting it up are pretty much the same with is, except that in the appcompat library after all the above steps, I had to copy the jar file and put it in the lib. folder of the project that needs it. I'm I missing anything?

感谢您的帮助。

推荐答案

Crouton正在使用摇篮建造。 这意味着源目录是不同的缺省Eclipse源路径

Crouton is being built using gradle. This means that the source directories are different to the default Eclipse source paths.

我劝阻建设没有一个适当的构建系统。 尽管如此,使用在Eclipse Crouton的1.8.2版本是可能的。

I discourage building without a proper build system. Nonetheless, using version 1.8.2 of Crouton within Eclipse is possible.

要做到这一点,只需下载从罐子<一href="http://search.maven.org/#artifactdetails%7Cde.keyboardsurfer.android.widget%7Ccrouton%7C1.8.2%7Cjar">maven中央 ,并把它放在你的libs文件夹。

To do so, simply download the jar from maven central and put it in your libs folder.

由于Crouton的当前版本不依赖于资源,增加它作为一个库是没有必要的。

Since the current version of Crouton does not rely on resources, adding it as a library is not necessary.

这篇关于我无法访问Crouton库在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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