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
精彩评论