Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ConnectivityService "Neither user 10052 nor current process has android.permission.ACCESS_NETWORK_STATE."

Tags:

android

I have a report of this exception even though I have the permission in the manifest:

E/AndroidRuntime(1215): java.lang.RuntimeException: Unable to start activity ComponentInfo{****}: java.lang.SecurityException: ConnectivityService: Neither user 10052 nor current process has android.permission.ACCESS_NETWORK_STATE.

Manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="****"
    android:versionCode="1"
    android:versionName="1.0" >

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

     <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="21" />

<application>
    ....
    </application>

</manifest>
like image 568
B.Houcem Avatar asked Jan 02 '15 14:01

B.Houcem


1 Answers

Try rebuilding your project (clean, build). If it doesn't help, you can try this a bit weird solution from here that seems to be working.

like image 182
Bartek Lipinski Avatar answered Oct 28 '22 13:10

Bartek Lipinski