权限仅授予系统应用程序

时间:2013-09-26 07:18:31

标签: android

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


<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>



<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

     <receiver
    android:name=".InstallBroadcastReceiver"
    android:exported="false" >
    <intent-filter>
    <category android:name="android.intent.category.DEFAULT" />
        <action android:name="android.intent.action.PACKAGE_ADDED" />
        <action android:name="android.intent.action.PACKAGE_INSTALL" />
        <data android:scheme="package" />
    </intent-filter>
</receiver>

    <activity android:name=".AndroidActivity" />
    <activity android:name=".WindowsActivity" />
    <activity android:name=".AppleActivity" />
    <activity android:name=".BlackBerryActivity" />

    <activity
        android:name="com.example.tabbar.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

当我在清单中插入此权限时,它显示错误“权限仅授予系统应用程序”

实际上我使用此权限来开发基于Oauth2令牌的应用程序。但我无法启用此权限。可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

关于permissions的Android文档:

public static final String INSTALL_PACKAGES

Added in API level 1
Allows an application to install packages.

**Not for use by third-party applications.**

Constant Value: "android.permission.INSTALL_PACKAGES"