1

Hi i am java laungage for a having a Map fragment,on that if i frequently open dialog and perform some operation. i am getting

set_timerslack_ns write failed: Operation not permitted

i have already tried this solution App crashes when running maps activity But the issue is same. When did some R & D. It showed showing Dialog on Map fragment causes this Issue. Is there any way to resolve it...? Adding tag to manifest is not resolving my Issue.

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
vinay shetty
  • 895
  • 1
  • 9
  • 15
  • Can you please post your logcat, maps activity, app-level build.gradle and manifest files? – evan Dec 03 '19 at 09:39
  • Does this answer your question? [SchedPolicy: set\_timerslack\_ns write failed: Operation not permitted](https://stackoverflow.com/questions/51908975/schedpolicy-set-timerslack-ns-write-failed-operation-not-permitted) – Strinder Jul 02 '20 at 13:10

2 Answers2

1

Another reason: On Android 11 if you try to access a permission together with a permission that needs to be requested before the others:

ActivityCompat.requestPermissions(sourceActivity,
                                            new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,
                                                    Manifest.permission.ACCESS_BACKGROUND_LOCATION,
                                                    Manifest.permission.ACCESS_FINE_LOCATION},...

Location permissions have to be requested before the background one: https://medium.com/google-developer-experts/exploring-the-android-11-developer-preview-permission-changes-61b18fb658

Strinder
  • 2,111
  • 2
  • 21
  • 34
0

This issue was mainly happening due to open of dialog,other view components when Map is Showing.

My issue was different which was occuring due to DB error .finally resolved it..

I got mistaken here,Bcoz it was Frequently showing this error in log.

vinay shetty
  • 895
  • 1
  • 9
  • 15
  • It is happening to me because of a bottom sheet dialog that opens on top of the map. is it important to fix it ? – Zied Orabi Sep 08 '21 at 21:49