Android M downloadprovider下载失败SecurityException

时间:2016-03-25 07:36:25

标签: java android android-6.0-marshmallow android-download-manager

E / DownloadManager(8228):[1]失败:java.lang.SecurityException:用户10004和当前进程都没有android.permission.UPDATE_DEVICE_STATS。 E / DownloadManager(8228):java.lang.SecurityException:用户10004和当前进程都没有android.permission.UPDATE_DEVICE_STATS。 E / DownloadManager(8228):在android.os.Parcel.readException(Parcel.java:1599) E / DownloadManager(8228):在android.os.Parcel.readException(Parcel.java:1552) E / DownloadManager(8228):在android.os.IPowerManager $ Stub $ Proxy.acquireWakeLock(IPowerManager.java:365) E / DownloadManager(8228):在android.os.PowerManager $ WakeLock.acquireLocked(PowerManager.java:1119) E / DownloadManager(8228):在android.os.PowerManager $ WakeLock.acquire(PowerManager.java:1087) E / DownloadManager(8228):at com.android.providers.downloads.DownloadThread.run(DownloadThread.java:238) E / DownloadManager(8228):at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:423) E / DownloadManager(8228):at java.util.concurrent.FutureTask.run(FutureTask.java:237) E / DownloadManager(8228):at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) E / DownloadManager(8228):at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:588) E / DownloadManager(8228):at java.lang.Thread.run(Thread.java:818) D / DownloadManager(8228):[2]完成状态为UNKNOWN_ERROR

W / DownloadManager(8228):未捕获的异常 W / DownloadManager(8228):java.lang.SecurityException:NetworkPolicy:用户10004和当前进程都没有android.permission.CONNECTIVITY_INTERNAL。 W / DownloadManager(8228):在android.os.Parcel.readException(Parcel.java:1599) W / DownloadManager(8228):在android.os.Parcel.readException(Parcel.java:1552) W / DownloadManager(8228):在android.net.INetworkPolicyManager $ Stub $ Proxy.unregisterListener(INetworkPolicyManager.java:379) W / DownloadManager(8228):在android.net.NetworkPolicyManager.unregisterListener(NetworkPolicyManager.java:160) W / DownloadManager(8228):at com.android.providers.downloads.DownloadThread.run(DownloadThread.java:330) W / DownloadManager(8228):at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:423) W / DownloadManager(8228):at java.util.concurrent.FutureTask.run(FutureTask.java:237) W / DownloadManager(8228):at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) W / DownloadManager(8228):at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:588) W / DownloadManager(8228):在java.lang.Thread.run(Thread.java:818)

1 个答案:

答案 0 :(得分:1)

从API级别23,您必须Requesting Permissions at Run Time