"Unfortunately MyAPP has stopped working" 由于 NFC 权限,可能

"Unfortunately MyAPP has stopped working" possible due to NFC permissions

我正在尝试开发 NFC 应用程序,但遇到了困难。我启动该应用程序,它立即失败并显示“不幸的是,请参阅(我的应用程序)已停止工作”。

我认为这是一个明显的问题,如 logcat 中所说,

"Java.lang.RuntimeException: Unable to resume activity {com.example.see/com.example.see.MainActivity}: java.lang.SecurityException: NFC permission required: Neither user 10197 nor current process has android.permission.NFC."

这是我的清单:

<?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="android.pemission.NFC" />

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="15"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.See">


    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <action android:name="android.nfc.action.NDEF_DISCOVERED" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="text/plain" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>
</application>

<uses-permission android:name="android.permission.NFC"/> 而不是 权限