java.lang.RuntimeException

Unable to start activity ComponentInfo{com.example.jitesh.rcot1/com.example.jitesh.rcot1.MainActivity}: java.lang.SecurityException: ConnectivityService: Neither user 10040 nor current process has android.permission.ACCESS_NETWORK_STATE.

Samebug tips5

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web40550

  • via Stack Overflow by Jitesh Lakhwani
    , 1 year ago
    Unable to start activity ComponentInfo{com.example.jitesh.rcot1/com.example.jitesh.rcot1.MainActivity}: java.lang.SecurityException: ConnectivityService: Neither user 10040 nor current process has android.permission.ACCESS_NETWORK_STATE.
  • Unable to start activity ComponentInfo{com.xxx.com.xxx.MainActivity}: java.lang.SecurityException: ConnectivityService: Neither user 10230 nor current process has android.permission.ACCESS_NETWORK_STATE.
  • via codegithub.com by Unknown author, 1 year ago
    Unable to start activity ComponentInfo{com.example.androidtwitterclient/com.example.androidtwitterclient.MainActivity}: java.lang.SecurityException: ConnectivityService: Neither user 10183 nor current process has android.permission.ACCESS_NETWORK_STATE.
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jitesh.rcot1/com.example.jitesh.rcot1.MainActivity}: java.lang.SecurityException: ConnectivityService: Neither user 10040 nor current process has android.permission.ACCESS_NETWORK_STATE. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980) at android.app.ActivityThread.access$600(ActivityThread.java:122) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4340) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.SecurityException: ConnectivityService: Neither user 10040 nor current process has android.permission.ACCESS_NETWORK_STATE. at android.os.Parcel.readException(Parcel.java:1327) at android.os.Parcel.readException(Parcel.java:1281) at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo(IConnectivityManager.java:597) at android.net.ConnectivityManager.getActiveNetworkInfo(ConnectivityManager.java:365) at com.example.jitesh.rcot1.MyFragment.isCon(MyFragment.java:62) at com.example.jitesh.rcot1.MyFragment.onActivityCreated(MyFragment.java:88) at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1983) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1092) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:601) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1133) at android.app.Activity.performStart(Activity.java:4475)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    10 times, 1 year ago
    4 times, 1 year ago
    11 times, 1 year ago
    12 times, 1 year ago
    232 more bugmates