java.lang.SecurityException

"passive" location provider requires ACCESS_FINE_LOCATION permission.

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()


rafaelrafael

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


rafaelrafael

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

Solutions on the web1297

  • via Stack Overflow by Visionwriter
    ,
  • Stack trace

    • java.lang.SecurityException: "passive" location provider requires ACCESS_FINE_LOCATION permission. at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.location.ILocationManager$Stub$Proxy.getLastLocation(ILocationManager.java:799) at android.location.LocationManager.getLastKnownLocation(LocationManager.java:1248) at com.vblast.dir.g.e(SourceFile:177) at com.vblast.dir.g.d(SourceFile:75) at com.vblast.dir.uberstations.b.onPreExecute(SourceFile:240) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:604) at com.vblast.dir.uberstations.b.a(SourceFile:226) at com.vblast.dir.uberstations.DirService.a(SourceFile:123) at com.vblast.dir.AbstractDirService.onStartCommand(SourceFile:85) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4062) at android.app.ActivityThread.access$2400(ActivityThread.java:221) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1897) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7224) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

    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

    asvidasvid
    9 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Hiren AmaliyarHiren Amaliyar
    669 times, last one
    filipebatistafilipebatista
    48 times, last one
    SacchiSacchi
    138 times, last one
    230 more bugmates