2014-01-13 250 views
0

當我在contentProvider類上調用insert時,我的應用崩潰了,並且我得到了權限被拒絕的錯誤。我如何設置權限?權限被拒絕

01-13 23:41:15.071  467-467/system_process W/ActivityManager﹕ Permission denied: checkComponentPermission() owningUid=10065 
01-13 23:41:15.071  467-467/system_process W/ActivityManager﹕ Permission Denial: opening provider net.kritico.todolist.ToDoContentProvider from ProcessRecord{a784a9c0 1669:net.kritico.kriticoads/u0a10069} (pid=1669, uid=10069) that is not exported from uid 10065 

我的清單是如下

<uses-sdk 
    android:minSdkVersion="9" 
    android:targetSdkVersion="18" /> 
<!-- Used to request banner and interstitial ads. --> 
<uses-permission android:name="android.permission.INTERNET" /> 

<!-- Used to avoid sending an ad request if there is no connectivity. --> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 
    <activity 
     android:name="net.kritico.kriticoads.MainActivity" 
     android:label="@string/app_name" 
     android:exported="true"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <!-- Activity required to show ad overlays. --> 
    <activity 
     android:name="com.google.ads.AdActivity" 
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode| 
    screenSize|s mallestScreenSize" /> 
    <activity 
     android:name="net.kritico.kriticoads.ToDoItemActivity" 
     android:label="@string/title_activity_to_do_item" > 
    </activity> 
</application> 

</manifest> 

回答