开发者

Nexus S: NoClassDefFoundError when using NFC

I'm trying to develop a small application which uses NFC on the Nexus S. Every time when I try to start my app on the phone (via Eclipse), it gives me an error:

java.lang.NoClassDefFoundError: android.nfc.tech.IsoDep
开发者_如何学编程

I tried the "API Demos" which comes with the SDK, but even this app gives me the error when starting the NFC part... All other functionalities are working fine. Does anyone has some hints for me?? I'm using Android 2.4.


I think you need to set permissions in the android manifest file. I don't have access to my development tools to try this right now, but something like:

<uses-sdk android:minSdkVersion="9" />
<uses-feature android:name="android.hardware.nfc" />

See http://developer.android.com/resources/samples/NFCDemo/index.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜