Java Android Bluetooth\u管理员权限错误

Java Android Bluetooth\u管理员权限错误,java,android,bluetooth,Java,Android,Bluetooth,关于Android蓝牙发现 从清单权限错误获取此错误。然而,我发现发布的唯一错误是,他们忘记将权限放在应用程序之外。然而,这里的情况并非如此 该程序在运行Jelly Bean 4.1的Galaxy S2上进行了测试 错误如下: 03-19 13:08:03.933: W/dalvikvm(12616): threadid=1: thread exiting with uncaught exception (group=0x413082a0) 03-19 13:08:03.938: E/Andro

关于Android蓝牙发现

从清单权限错误获取此错误。然而,我发现发布的唯一错误是,他们忘记将权限放在应用程序之外。然而,这里的情况并非如此

该程序在运行Jelly Bean 4.1的Galaxy S2上进行了测试

错误如下:

03-19 13:08:03.933: W/dalvikvm(12616): threadid=1: thread exiting with uncaught exception (group=0x413082a0)
03-19 13:08:03.938: E/AndroidRuntime(12616): FATAL EXCEPTION: main
03-19 13:08:03.938: E/AndroidRuntime(12616): java.lang.SecurityException: Need BLUETOOTH_ADMIN permission: Neither user 10004 nor current process has android.permission.BLUETOOTH_ADMIN.
基本上,清单如下所示:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.motioncontrol"
    android:versionCode="1"
    android:versionName="1.0" >


    <user-permission android:name="android.permission.BLUETOOTH_ADMIN" />              
    <uses-permission android:name="android.permission.BLUETOOTH" />

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:debuggable="true"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.motioncontrol.Main"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".AccelerometerDat"
            android:label="@string/accelerator_title" />
        <activity
            android:name=".GyroscopeData" />
        <activity
            android:name=".Gravitydat" />
        <activity
            android:name=".Linearacc" />
        <activity
            android:name=".Bluetooth" />
        <activity 
            android:name=".CheckBluetooth" />
        <activity
            android:name=".About"
            android:label="@string/about_title"
            android:theme="@android:style/Theme.Dialog" />
    </application>


</manifest>
希望得到一个答案,出了什么问题:)

谢谢

变化

<user-permission android:name="android.permission.BLUETOOTH_ADMIN" />              



用于调节其他应用程序对当前组件的访问。您应该尝试
来获得特权

总是那些小的打字错误让你很难受。
<user-permission android:name="android.permission.BLUETOOTH_ADMIN" />              
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />