title: java.lang.SecurityException: Provider gps requires ACCESS_FINE_LOCATION permission
body: <p>I try to develope an Android map application, utilizing the Google maps API.</p>
  
  <p>Testing on several emulatet Android devices (2.1; 2.3.3;4.0.3) all with Google API.</p>
  
  <p>The problem is that logcat throws this at me:</p>
  
  <pre><code>02-05 04:39:57.519: E/AndroidRuntime(588): FATAL EXCEPTION: main
  02-05 04:39:57.519: E/AndroidRuntime(588): java.lang.RuntimeException: Unable to start activity ComponentInfo{map.test.activity/map.test.activity.MapTestActivity}: java.lang.SecurityException: Provider gps requires ACCESS_FINE_LOCATION permission
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.os.Handler.dispatchMessage(Handler.java:99)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.os.Looper.loop(Looper.java:130)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread.main(ActivityThread.java:3683)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at java.lang.reflect.Method.invokeNative(Native Method)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at java.lang.reflect.Method.invoke(Method.java:507)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at dalvik.system.NativeStart.main(Native Method)
  02-05 04:39:57.519: E/AndroidRuntime(588): Caused by: java.lang.SecurityException: Provider gps requires ACCESS_FINE_LOCATION permission
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.os.Parcel.readException(Parcel.java:1322)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.os.Parcel.readException(Parcel.java:1276)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:646)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at map.test.activity.MapTestActivity.onCreate(MapTestActivity.java:29)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  02-05 04:39:57.519: E/AndroidRuntime(588):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
  02-05 04:39:57.519: E/AndroidRuntime(588):  ... 11 more
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>package map.test.activity;
  
  import android.content.Context;
  import android.location.Location;
  import android.location.LocationListener;
  import android.location.LocationManager;
  import android.os.Bundle;
  
  import com.google.android.maps.GeoPoint;
  import com.google.android.maps.MapActivity;
  import com.google.android.maps.MapController;
  import com.google.android.maps.MapView;
  
  public class MapTestActivity extends MapActivity {
  
      private MapController mapController;
      private MapView mapView;
      private LocationManager locationManager;
  
      public void onCreate(Bundle bundle) {
          super.onCreate(bundle);
          setContentView(R.layout.main); // bind the layout to the activity
  
          mapView = (MapView) findViewById(R.id.mapview);
          mapView.setBuiltInZoomControls(true);
          mapController = mapView.getController();
          mapController.setZoom(10); // Zoom 1 is world view
          locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
          locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
                          0, new GeoUpdateHandler());
      } //public void 
  
      @Override
      protected boolean isRouteDisplayed() {
          return false;
      }// protected boolean
  
      public class GeoUpdateHandler implements LocationListener {
  
              public void onLocationChanged(Location location) {
                      int lat = (int) (location.getLatitude() * 1E6);
                      int lng = (int) (location.getLongitude() * 1E6);
                      GeoPoint point = new GeoPoint(lat, lng);
                      mapController.animateTo(point);
              }
  
              public void onProviderDisabled(String provider) {
                  // TODO Auto-generated method stub
  
              }
  
              public void onProviderEnabled(String provider) {
                  // TODO Auto-generated method stub
  
              }
  
              public void onStatusChanged(String provider, int status,
                      Bundle extras) {
                  // TODO Auto-generated method stub
  
              }
      }
  
  } //public class MapTestActivity
  </code></pre>
  
  <p>And the Manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="map.test.activity" android:versionCode="1"
      android:versionName="1.0"&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
      &lt;uses-permission android:name="android.permission.ACCES_COARSE_LOCATION"&gt;&lt;/uses-permission&gt;
      &lt;uses-permission android:name="android.permission.ACCES_FINE_LOCATION"&gt;&lt;/uses-permission&gt;
  
      &lt;uses-sdk android:minSdkVersion="10" /&gt; 
  
      &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name"&gt;
          &lt;activity android:name=".MapTestActivity" android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;uses-library android:required="true" android:name="com.google.android.maps" /&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I already tried shifting the position of the permissions and setting the compiler to JAVA 1.6 (and adding @Override to the last three public voids).
  It's propably something really obvious but I just started developing in Java.</p>