title: Android: map view doesn't work
body: <p>in my Android App I have add a map activity whit the Android Studio procedure (add-> new activity -> Google -> Map). I have followed this example: <a href="https://developers.google.com/maps/documentation/android-api/start#step_2_install_the_google_play_services_sdk" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/android-api/start#step_2_install_the_google_play_services_sdk</a>.</p>
  
  <p>But if I open the map activity, it's strange, I see only a map whit the Google logo but completely empty (I attach a screenshot). And I don't see any connection or key error message. Why?</p>
  
  <p>PS I have only added the "import com.mycompany.myapp.R" row in the activity java file, because in the original file create with the automatic procedure, I see all "R" in that file in red as an error.</p>
  
  <p>Summarizing:</p>
  
  <p>1) I have add a map activity whit the Android Studio automatic procedure
  2) I have followed the procedure and copied the key in my app (I don't see any key or certificate error message)
  3) I have only add the row about import com.mycompany.myapp.R
  4) If I test on my real device, I see a blank map.</p>
  
  <p>Thank!</p>
  
  <p>Code of activity:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.mycompany.myapp.Views.myFragmentMap" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Code of java file related to the activity:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>package com.mycompany.myapp.Views;
  
  import android.support.v4.app.FragmentActivity;
  import android.os.Bundle;
  
  import com.google.android.gms.maps.CameraUpdateFactory;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.OnMapReadyCallback;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.MarkerOptions;
  
  //I have added only this one!
  import com.mycompany.myapp.R;
  
  public class myFragmentMap extends FragmentActivity implements OnMapReadyCallback {
  
      private GoogleMap mMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.fragment_myapp_map);
          // Obtain the SupportMapFragment and get notified when the map is ready to be used.
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map);
          mapFragment.getMapAsync(this);
      }
  
  
      /**
       * Manipulates the map once available.
       * This callback is triggered when the map is ready to be used.
       * This is where we can add markers or lines, add listeners or move the camera. In this case,
       * we just add a marker near Sydney, Australia.
       * If Google Play services is not installed on the device, the user will be prompted to install
       * it inside the SupportMapFragment. This method will only be triggered once the user has
       * installed Google Play services and returned to the app.
       */
      @Override
      public void onMapReady(GoogleMap googleMap) {
          mMap = googleMap;
  
          // Add a marker in Sydney and move the camera
          LatLng sydney = new LatLng(-34, 151);
          mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
          mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Google maps api file, in which I have copied my key:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;resources&gt;
  
      &lt;string name="google_maps_key" templateMergeStrategy="preserve" translatable="false"&gt;
          AIza.... (and the correct code imported from Google)
      &lt;/string&gt;
  &lt;/resources&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And this is the screen of the activity
  <a href="https://i.stack.imgur.com/cVG92.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cVG92.jpg" alt="enter image description here"></a></p>