title: ERROR Error: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
body: <p>I want to use google maps in my project. For this:</p>
  
  <p>In first I install and configuration plugin <code>&gt;&gt; tns plugin add nativescript-google-maps-sdk</code> This plugin works good for me.</p>
  
  <p>In second I want to display in google maps also and my current location, for this I install <code>&gt;&gt; tns plugin add nativescript-geolocation</code></p>
  
  <p>In <code>AndroidMainfest.xml</code> add</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  &lt;supports-screens /&gt;
  &lt;uses-sdk /&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt; 
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt; 
  &lt;application&gt;
  .......
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>and in ts component</p>
  
  <pre><code>onMapReady(event) {
      this.mapView = event.object;
      this.ws.mobile_base_pharmacyGetAll().subscribe(
          items =&gt; {
              console.log(items)
              this.items = items;
              if (items !== undefined || items !== undefined) {
                  for (let i = 0; i &lt; this.items.length; i++) {            
                      var marker = new Marker();
                      marker.position = Position.positionFromLatLng(this.items[i].latitude, this.items[i].longitude);
                      marker.title = this.items[i].name;
                      marker.snippet = this.items[i].address1;
                      marker.userData = { index: 1 };
                      this.mapView.addMarker(marker);   
                      this.mapView.myLocationEnabled = true;   
                 }
              }
          },
          err =&gt; console.error('err', err),
          () =&gt; console.log('error')
      );
  }
  </code></pre>
  
  <p>This code in Android 5.1.1 works very well. In Android version 7 and more does not work. Error:</p>
  
  <blockquote>
    <p>JS: ERROR Error: java.lang.SecurityException: my location requires
    permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION JS:<br>
    com.google.maps.api.android.lib6.impl.bg.c(:com.google.android.gms.dynamite_mapsdynamite@17785050@17.7.85
    (040406-253824076):545) JS:<br>
    com.google.android.gms.maps.internal.m.a(:com.google.android.gms.dynamite_mapsdynamite@17785050@17.7.85
    (040406-253824076):361) JS:<br>
    hp.onTransact(:com.google.android.gms.dynamite_mapsdynamite@17785050@17.7.85
    (040406-253824076):4) JS:<br>
    android.os.Binder.transact(Binder.java:499) JS:<br>
    com.google.android.gms.internal.maps.zza.transactAndReadExceptionReturnVoid(Unknown
    Source) JS:<br>
    com.google.android.gms.maps.internal.zzg.setMyLocationEnabled(Unknown
    Source) JS:<br>
    com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(Unknown
    Source) JS:     com.tns.Runtime.callJSMethodNative(Native Method) JS: 
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203) JS:<br>
    com.tns.Runtime.callJSMethodImpl(Runtime.java:1083) JS:<br>
    com.tns.Runtime.callJSMethod(Runtime.java:1070)</p>
  </blockquote>
  
  <p>Can you suggest me any idea please, what is a problem and how to solution? I can't find any solution in google.</p>
  
  <p>Thank you!</p>
  
  <p>UPDATE:</p>
  
  <p>I change it, but nothing change, error exist.</p>
  
  <p><a href="https://i.stack.imgur.com/oDi89.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oDi89.png" alt="enter image description here"></a></p>