android - 打开 NFC 模拟器不适用于 Android 模拟器

标签 android android-emulator nfc avd open-nfc

我正在尝试在 Android 模拟器中模拟 NFC 卡读取,为此目的使用 Open NFC v4.5.2。

我已按照此处指示的所有步骤进行操作:

HOWTO use the NFC Simulator with the Open NFC add-on included in the delivery

我也尝试过其他 StackOverflow 帖子的说明,例如 thisthis , 没有成功。

当我启动模拟器时,我无法在 Settings->Wireless & networks->NFC 中打开 NFC,并且 NFC Controller Simulator 没有显示任何 Activity :

Emulator NFC settings NFC simulator

以下是连接中心的捕获:

Connection Center

关于如何让它工作的任何提示?

编辑: 以下是我从 adb logcat 获得的输出:

W/Settings(  381): Setting airplane_mode_on has moved from android.provider.Sett
ings.System to android.provider.Settings.Global, returning read-only value.
W/Trace   (  447): Unexpected value from nativeGetEnabledTags: 0
W/Trace   (  447): Unexpected value from nativeGetEnabledTags: 0
I/NfcService(  381): Enabling NFC
I/packages/apps/Nfc/nxp/jni/com_android_nfc_NativeNfcManager.cpp(  381): com_and
roid_nfc_NfcManager_initialize
E/packages/apps/Nfc/nxp/jni/com_android_nfc_NativeNfcManager.cpp(  381): can't i
nitialize NFC Manager
W/NfcService(  381): Error enabling NFC

我正在使用 Windows 8 Pro 机器。

最佳答案

我怀疑它可能取决于模拟器中 Android 图像的版本,您是否使用了以下图像(或整套图像):

http://open-nfc.org/wp/home/downloads/

还是来自 Google 发行版?

关于android - 打开 NFC 模拟器不适用于 Android 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17523019/

相关文章:

android - 由于 Lollipop 中的 'void dalvik.system.CloseGuard.close()' 导致的 NullPointerException

android - 如何使用自定义 Makefile 为 Android 编译 STL C++?

android - 安装 React Navigation 和手势处理程序后出错

android - 如何在android中使用NFC在两个设备之间发送数据?

java - 将 onResume/onStop 用于首选项(设置)

android - 添加 Firestore 依赖项时,简单程序获取 "Cannot fit requested classes in a single dex file"

android - 如何从控制台创建 snapshots.img?

android - 在 Android 4.0 模拟器上使用笔记本电脑网络摄像头

android - 读取 NFC 标签时出现奇怪的字符

android - 从 Android 应用程序的 NFC 标签中读取 NDEF 消息