`

NFC Demo: com.google.common.base.Preconditions 找不到

阅读更多
我在eclipse里面导入NFC Demo会有很多类找不到:
import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;


不知道是否是sdk里面没有包进去呢?还是怎样。在网上搜索了,这些类都是在google的collection里面,但若你下载用Google-collection.jar,还是许多类找不到,你要用guava-r07.jar包。你到Guava的官网你就会看见这段话:

If your application ever ends up with both google-collect-1.0.jar and guava-r##.jar on the same classpath, simply remove the Google Collections JAR and you should be fine. If you don't remove it, it will either cause terrible problems (if it comes before guava in the classpath) or will never even be seen anyway (if it comes after).

所以你要下载guava-r07.jar,将其导入到NFC Demo里面,这样这个工程就可以运行了。下载地址:[url]http://code.google.com/p/guava-libraries/downloads/detail?name=guava-r07.zip&can=2&q=
[/url]

分享到:
评论
9 楼 monkeyan 2011-04-04  
Hi, 你好。 看了你的文章, 我试了很久把guava-r07.jar导进NfcDemo, 甚至直接把guava-r07.jar包拷进NfcDemo文件夹下, 还是运行不了, 编译出错。你的qq也一直加不上。我的qq是: 1136005881。 你能加我试试么? 还有, 能解释一下, 为什么要guava-r07.jar包这个包么? 或者把链接给我也行。我很着急用这个例子。 谢谢!
8 楼 wdeqingren 2011-03-03  
thank u !  我也是跑跑例子 恩 
7 楼 追求幸福 2011-02-23  
fooky 写道
能告诉我这个DEMO作用是什么吗?
我跑起来,屏幕上就有几行:
Broadcast NFC Text Tag
Broadcast NFC SmartPoster URL & text
Broadcast NFC SmartPoster URL
点击进去后,有什么 New tag collected...等
去想请教一下,如何体验NFC功能啊?谢谢!

fooky 写道
能告诉我这个DEMO作用是什么吗?
我跑起来,屏幕上就有几行:
Broadcast NFC Text Tag
Broadcast NFC SmartPoster URL & text
Broadcast NFC SmartPoster URL
点击进去后,有什么 New tag collected...等
去想请教一下,如何体验NFC功能啊?谢谢!

fooky 写道
能告诉我这个DEMO作用是什么吗?
我跑起来,屏幕上就有几行:
Broadcast NFC Text Tag
Broadcast NFC SmartPoster URL & text
Broadcast NFC SmartPoster URL
点击进去后,有什么 New tag collected...等
去想请教一下,如何体验NFC功能啊?谢谢!

不好意思,我也只是把它跑起来而已。网上的资料很少,也没体验过。不过昨天我看了一下development,android 2.3.3已经加强这方面了,你可以去看看。我QQ370001958可以一起研究。
6 楼 fooky 2011-02-22  
能告诉我这个DEMO作用是什么吗?
我跑起来,屏幕上就有几行:
Broadcast NFC Text Tag
Broadcast NFC SmartPoster URL & text
Broadcast NFC SmartPoster URL
点击进去后,有什么 New tag collected...等
去想请教一下,如何体验NFC功能啊?谢谢!
5 楼 追求幸福 2011-02-21  
hackbaby 写道
追求幸福 写道
fooky 写道
你好,NFC DEMO 现在在哪里可以下载得到啊,网站好像被墙掉了。

你下载完2.2的sdk之后里面的sample就会有这个NFC DEMO的。

怎么我得2.2的sample目录里面没有看到NFC DEMO(是不是别的名字啊),楼主确定是2.2的SDK里面就带了么,不是说是2.3.3才加入NFC的新特性么

呵呵,是2.3啦,我打错了,不好意思。就是NFCDemo
4 楼 hackbaby 2011-02-20  
追求幸福 写道
fooky 写道
你好,NFC DEMO 现在在哪里可以下载得到啊,网站好像被墙掉了。

你下载完2.2的sdk之后里面的sample就会有这个NFC DEMO的。

怎么我得2.2的sample目录里面没有看到NFC DEMO(是不是别的名字啊),楼主确定是2.2的SDK里面就带了么,不是说是2.3.3才加入NFC的新特性么
3 楼 追求幸福 2011-02-08  
fooky 写道
你好,NFC DEMO 现在在哪里可以下载得到啊,网站好像被墙掉了。

你下载完2.2的sdk之后里面的sample就会有这个NFC DEMO的。
2 楼 fooky 2011-02-05  
你好,NFC DEMO 现在在哪里可以下载得到啊,网站好像被墙掉了。

相关推荐

    google common jar包

    import com.google.common.base.Preconditions 编译Setting 或SystemUI会用到。欢迎下载!!

    google common jar包1.0

    import com.google.common.base.Preconditions 编译Setting 或SystemUI会用到。

    guava.jar包 NFC用到

    import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; 报错,找不到这些类 解决: 要用guava.jar包 Guava 中文是...

    scala-js-env-selenium:Scala.js环境

    否则,您可能会得到诸如此类的错误作为java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState运行测试时): // For Scala.js 0.6.x libraryDependencies + = " org.scala-js " %% " ...

    flink 1.14.4 源码下载

    flink 1.14.4 源码下载

    guava-r09.jar

    com.google.common.base.Preconditions.class com.google.common.io.MultiInputStream.class

    Guide to Scientific Computing in C++

    2.6.1 Tip 1: A Common Novice Coding Error . . . . . . . . 2.6.2 Tip 2: Counting from Zero . . . . . . . . . . . . . . . . 2.6.3 Tip 3: Equality Versus Assignment . . . . . . . . . . . 2.6.4 Tip 4: ...

    Labview TestStand教程

    TestStand Development Course Manual iv www.ni.com Lesson 2 The TestStand Environment Introduction..........................................................................................................

    Change Color of Component in Specific Display State Example

    Preconditions: Verify that the specified assembly and part exist. Postconditions: 1. Opens the specified assembly document. 2. Examine the graphics area, then press F5. 3. Changes the selected ...

    不加密Google Guava视频教程.txt

    ├─Google Guava 第03讲-Preconditions&Objects;&assert;讲解.wmv ├─Google Guava 第04讲-Objects&MoreObjects;&ComparisonChain;.wmv ├─Google Guava 第05讲-Strings&Charsets;&CharMatcher;.wmv ├─...

    前端项目-preconditions.zip

    前端项目-preconditions,基于谷歌前提条件库的前提条件包

    On Extending Semantic Matchmaking to Include Preconditions and Effects.pdf

    However, a complete description of the service profile also includes preconditions and effects and in order to find a true match the matchmaker needs to match on these aspects of the advertisement as...

    移居

    138)在dagger.hilt.internal.Preconditions.checkState(Preconditions.java:83)在org.junit.rules.RunRules.evaluate(RunRules.java:20)在org.junit.runners.ParentRunner.runLeaf(ParentRu

    上传xml文档

    <preconditions><![CDATA[1.使用udp_bi用户在PLSQL正常登陆UAT数据库 (UAT数据库IP: 10.0.13.178) 2.数据库脚本已下载至本地环境]]></preconditions><importance><![CDATA[2]]></importance><steps> <step>

    kotlin-preconditions:Kotlin的前提条件错误检查

    用法kotlin-preconditions提供了用于定义前提条件的强大DSL: checkThat( 1 ) { isLt( 2 ) }checkThat( listOf ( 1 , 2 )) { contains( 1 ) }requireThat( 1 ) { isLt( 2 ) }requireThat( listOf ( 1 , 2 )) { ...

    guava-20.0.rar

    guava正式发布了20.0版本,...common.base 1.CharMatcher相比19.0弃用了一些方法,并且在2年内会将弃用的方法移除. 2.Preconditions中checkNonNull和checkState有变化 3.Throwables新添加了方法和弃用了一些方法 .....

    Python实现将xml导入至excel

    最近在使用Testlink时,发现导入的用例是xml格式,且没有合适的工具转成excel格式...这是一个有两级testusuit的典型的testlink用例结构,我们只需要取testsuite name,testcase name,preconditions,actions,expectedr

    better-preconditions:Java API,用于创建流利,可读和可测试的前提条件

    受Guava Preconditions和Jasmine的启发,Better Preconditions是一组Java API,用于创建流利的,可读的和可测试的Java前提条件。 Maven依赖 < groupId>com.github.choonchernlim</ groupId> < artifactId>better...

    Android项目源码全功能语音视频通话客户端Imsdroid.zip

    官网地址:http://code.google.com/p/imsdroid/ 组件 1、Boghe IMS/ RCS Windows客户端 2、IMSDroid IMS/ RCS Android客户端(使用NGN堆栈) 3、iDoubs IMS/ RCS iOS客户端(iPhone,iPad和iPod Touch) 4、...

Global site tag (gtag.js) - Google Analytics